test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
testing_classes.script_tests Class Reference
Inheritance diagram for testing_classes.script_tests:

Public Member Functions

def setUp
 
def tearDown
 
def test_script
 
def test_script_with_decorator
 

Public Attributes

 connection
 
 connection_data
 

Detailed Description

Definition at line 308 of file testing_classes.py.

Member Function Documentation

def testing_classes.script_tests.setUp (   self)

Definition at line 310 of file testing_classes.py.

311  def setUp(self):
312  self.connection_data = {"db_alias" : "orapro", "host" : "oracle", "schema" : "cms_conditions", "secrets" : secrets_file}
def connect
Definition: querying.py:352
def testing_classes.script_tests.tearDown (   self)

Definition at line 337 of file testing_classes.py.

338  def tearDown(self):
self.connection.close_session()
def testing_classes.script_tests.test_script (   self)

Definition at line 314 of file testing_classes.py.

References doHarvest.api, querying.connection.connection_data, testing_classes.script_tests.connection_data, and data.

315  def test_script(self):
316  class script():
317  def script(self_instance, connection):
318  tag = self.connection.tag(name="EBAlignment_hlt")
319  valid_iovs = tag.iovs()
320  return valid_iovs
321  api_obj = api(self.connection_data)
322  data = api_obj.run_script(script(), output=False)
323  #pprint.pprint(data.data())
324  self.assertEqual(data.get(0).data().payload_hash, "1480c559bbbdacfec514c3cbcf2eb978403efd74")
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple api
Definition: doHarvest.py:42
def testing_classes.script_tests.test_script_with_decorator (   self)

Definition at line 325 of file testing_classes.py.

References doHarvest.api, querying.connection.connection_data, testing_classes.script_tests.connection_data, and data.

326  def test_script_with_decorator(self):
327  class script():
328  @data_formats.objects_to_dicts
329  def script(self_instance, connection):
330  tag = self.connection.tag(name="EBAlignment_hlt")
331  valid_iovs = tag.iovs()
332  return valid_iovs
333  api_obj = api(self.connection_data)
334  data = api_obj.run_script(script(), output=False)
335  #pprint.pprint(data.data())
336  self.assertEqual(data.get(0, "payload_hash").data(), "1480c559bbbdacfec514c3cbcf2eb978403efd74")
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple api
Definition: doHarvest.py:42

Member Data Documentation

testing_classes.script_tests.connection

Definition at line 312 of file testing_classes.py.

testing_classes.script_tests.connection_data

Definition at line 311 of file testing_classes.py.

Referenced by testing_classes.script_tests.test_script(), and testing_classes.script_tests.test_script_with_decorator().