Exemplo n.º 1
0
 def setUpClass(cls):
     cls.project = datafilereader.construct_project(
         datafilereader.SIMPLE_TEST_SUITE_PATH)
     cls.directory = cls.project.data
     cls.test = datafilereader.get_ctrl_by_name(
         'TestSuite1', cls.project.datafiles)
     cls.resource = datafilereader.get_ctrl_by_name(
         datafilereader.SIMPLE_TEST_SUITE_RESOURCE_NAME,
         cls.project.datafiles)
     cls.external_resource = datafilereader.get_ctrl_by_name(
         'Resu', cls.project.datafiles)
 def setUpClass(cls):
     cls.chief = datafilereader.construct_chief_controller(
         datafilereader.SIMPLE_TEST_SUITE_PATH)
     cls.directory = cls.chief.data
     cls.test = datafilereader.get_ctrl_by_name('TestSuite1',
                                                cls.chief.datafiles)
     cls.resource = datafilereader.get_ctrl_by_name(
         datafilereader.SIMPLE_TEST_SUITE_RESOURCE_NAME,
         cls.chief.datafiles)
     cls.external_resource = datafilereader.get_ctrl_by_name(
         'Resu', cls.chief.datafiles)
Exemplo n.º 3
0
 def setUpClass(cls):
     cls.project_ctrl = datafilereader.construct_project(
         datafilereader.SIMPLE_TEST_SUITE_PATH)
     cls.ts1 = datafilereader.get_ctrl_by_name('TestSuite1',
                                               cls.project_ctrl.datafiles)
     cls.ts2 = datafilereader.get_ctrl_by_name('TestSuite2',
                                               cls.project_ctrl.datafiles)
     cls.ts3 = datafilereader.get_ctrl_by_name('TestSuite3',
                                               cls.project_ctrl.datafiles)
     cls.resu = datafilereader.get_ctrl_by_name(
         datafilereader.SIMPLE_TEST_SUITE_RESOURCE_NAME,
         cls.project_ctrl.datafiles)
Exemplo n.º 4
0
 def setUpClass(cls):
     cls.project_ctrl = datafilereader.construct_project(
         datafilereader.SIMPLE_TEST_SUITE_PATH)
     cls.ts1 = datafilereader.get_ctrl_by_name('TestSuite1',
                                               cls.project_ctrl.datafiles)
     cls.ts2 = datafilereader.get_ctrl_by_name('TestSuite2',
                                               cls.project_ctrl.datafiles)
     cls.ts3 = datafilereader.get_ctrl_by_name('TestSuite3',
                                               cls.project_ctrl.datafiles)
     cls.resu = datafilereader.get_ctrl_by_name(
         datafilereader.SIMPLE_TEST_SUITE_RESOURCE_NAME,
         cls.project_ctrl.datafiles)
Exemplo n.º 5
0
 def setUpClass(cls):
     ctrl = datafilereader.construct_chief_controller(datafilereader.ARGUMENTS_PATH)
     cls.testsuite = datafilereader.get_ctrl_by_name('Suite', ctrl.datafiles)
     cls.test = cls.testsuite.tests[0]
     cls.keyword1 = [kw for kw in cls.testsuite.keywords if kw.name == 'KW1'][0]
     cls.keyword2 = [kw for kw in cls.testsuite.keywords if kw.name == 'KW2'][0]
     cls.keyword3 = [kw for kw in cls.testsuite.keywords if kw.name == 'KW3'][0]
Exemplo n.º 6
0
 def test_resource_import_knows_resource_after_import_has_been_removed(self):
     item_without_settings = datafilereader.get_ctrl_by_name('Inner Resource', self.ctrl.datafiles)
     self.assertEqual(list(item_without_settings.imports), [])
     self._create_resource()
     import_ = item_without_settings.imports.add_resource('/'.join(['..', self.res_name]))
     self.assertTrue(import_ is not None)
     item_without_settings.imports.delete(0)
     self.assertEqual(self.new_resource, import_.get_previous_imported_controller())
Exemplo n.º 7
0
 def test_resource_import_knows_resource_after_import_has_been_removed(self):
     item_without_settings = datafilereader.get_ctrl_by_name("Inner Resource", self.ctrl.datafiles)
     self.assertEqual(list(item_without_settings.imports), [])
     self._create_resource()
     import_ = item_without_settings.imports.add_resource("/".join(["..", self.res_name]))
     self.assertTrue(import_ is not None)
     item_without_settings.imports.delete(0)
     self.assertEqual(self.new_resource, import_.get_imported_controller())
Exemplo n.º 8
0
 def setUpClass(cls):
     ctrl = datafilereader.construct_chief_controller(datafilereader.ARGUMENTS_PATH)
     cls.testsuite = datafilereader.get_ctrl_by_name('Suite', ctrl.datafiles)
     cls.test = cls.testsuite.tests[0]
     keyword = lambda name: [kw for kw in cls.testsuite.keywords if kw.name == name][0]
     cls.keyword1 = keyword('KW1')
     cls.keyword2 = keyword('KW2')
     cls.keyword3 = keyword('KW3')
     cls.keyword4 = keyword('KW4')
Exemplo n.º 9
0
 def setUp(self):
     self.res_path = datafilereader.SIMPLE_TEST_SUITE_PATH
     self.res_name = 'new_resource_for_test_creating_and_importing_resource.txt'
     self.res_full_name = os.path.join(self.res_path, self.res_name)
     self.new_keyword_name = 'My Keywordian'
     self.ctrl = datafilereader.construct_chief_controller(datafilereader.SIMPLE_TEST_SUITE_PATH)
     self.suite = datafilereader.get_ctrl_by_name('TestSuite1', self.ctrl.datafiles)
     self.test = self.suite.tests[0]
     self.test.execute(ChangeCellValue(0,0,self.new_keyword_name))
     self.test.execute(ChangeCellValue(0,1,'value'))
Exemplo n.º 10
0
 def setUp(self):
     self.res_path = datafilereader.SIMPLE_TEST_SUITE_PATH
     self.res_name = 'new_resource_for_test_creating_and_importing_resource.txt'
     self.res_full_name = os.path.join(self.res_path, self.res_name)
     self.new_keyword_name = 'My Keywordian'
     self.ctrl = datafilereader.construct_project(datafilereader.SIMPLE_TEST_SUITE_PATH)
     self.suite = datafilereader.get_ctrl_by_name('TestSuite1', self.ctrl.datafiles)
     self.test = self.suite.tests[0]
     self.test.execute(ChangeCellValue(0,0,self.new_keyword_name))
     self.test.execute(ChangeCellValue(0,1,'value'))
Exemplo n.º 11
0
 def setUpClass(cls):
     cls.project_ctrl = datafilereader.construct_project(datafilereader.ARGUMENTS_PATH)
     cls.testsuite = datafilereader.get_ctrl_by_name('Suite', cls.project_ctrl.datafiles)
     cls.test = cls.testsuite.tests[0]
     keyword = lambda name: [kw for kw in cls.testsuite.keywords if kw.name == name][0]
     cls.keyword1 = keyword('KW1')
     cls.keyword2 = keyword('KW2')
     cls.keyword3 = keyword('KW3')
     cls.keyword4 = keyword('KW4')
     cls.keyword5 = keyword('KW5')
Exemplo n.º 12
0
 def setUp(self):
     self.res_path = datafilereader.OCCURRENCES_PATH
     self.res_name = "new_resource_for_test_creating_and_importing_resource.txt"
     self.res_full_name = os.path.join(self.res_path, self.res_name)
     self.new_keyword_name = "My Keywordian"
     self.ctrl = datafilereader.construct_chief_controller(datafilereader.OCCURRENCES_PATH)
     self.suite = datafilereader.get_ctrl_by_name("TestSuite1", self.ctrl.datafiles)
     self.test = self.suite.tests[0]
     self.test.execute(ChangeCellValue(0, 0, self.new_keyword_name))
     self.test.execute(ChangeCellValue(0, 1, "value"))
Exemplo n.º 13
0
 def _get_ctrl_by_name(self, name):
     return datafilereader.get_ctrl_by_name(name , self.project.datafiles)
Exemplo n.º 14
0
 def setUpClass(cls):
     ctrl = datafilereader.construct_chief_controller(datafilereader.OCCURRENCES_PATH)
     cls.ts1 = datafilereader.get_ctrl_by_name("TestSuite1", ctrl.datafiles)
     cls.ts2 = datafilereader.get_ctrl_by_name("TestSuite2", ctrl.datafiles)
     cls.resu = datafilereader.get_ctrl_by_name(datafilereader.OCCURRENCES_RESOURCE_NAME, ctrl.datafiles)
Exemplo n.º 15
0
 def _get_ctrl_by_name(self, name):
     return datafilereader.get_ctrl_by_name(name, self.project.datafiles)
Exemplo n.º 16
0
 def setUp(self):
     self._project = datafilereader.construct_project(datafilereader.SIMPLE_PROJECT)
     self._test = datafilereader.get_ctrl_by_name('Test Case', self._project.datafiles[0].tests)
     self._keyword = datafilereader.get_ctrl_by_name('Keyword', self._project.datafiles[0].keywords)
Exemplo n.º 17
0
 def _get_resource_dir(self):
     return datafilereader.get_ctrl_by_name(
         datafilereader.SIMPLE_TEST_SUITE_INNER_RESOURCE_DIR,
         self.project.datafiles)
Exemplo n.º 18
0
 def setUp(self):
     ctrl = datafilereader.construct_chief_controller(datafilereader.LOG_MANY_SUITE)
     self.datafile = datafilereader.get_ctrl_by_name('Log Many', ctrl.datafiles)
     self.testcase = self.datafile.tests[0]
Exemplo n.º 19
0
 def setUp(self):
     self.project_ctrl = datafilereader.construct_project(datafilereader.LOG_MANY_SUITE)
     self.datafile = datafilereader.get_ctrl_by_name('Log Many', self.project_ctrl.datafiles)
     self.testcase = self.datafile.tests[0]
Exemplo n.º 20
0
 def test_used_resource_knows_it_is_used(self):
     used = datafilereader.get_ctrl_by_name('Used Resource',
                                            self.project.datafiles)
     self.assertTrue(used.is_used())
Exemplo n.º 21
0
 def test_unused_resource_knows_it_is_unused(self):
     unused = datafilereader.get_ctrl_by_name('Unused Resource', self.chief.datafiles)
     self.assertFalse(unused.is_used())
Exemplo n.º 22
0
 def _get_ctrl_by_name(self, name):
     return datafilereader.get_ctrl_by_name(name , self.chief.datafiles)
Exemplo n.º 23
0
 def setUpClass(cls):
     chief = datafilereader.construct_chief_controller(datafilereader.OCCURRENCES_PATH)
     cls.directory = chief.data
     cls.test = datafilereader.get_ctrl_by_name('TestSuite1', chief.datafiles)
     cls.resource = datafilereader.get_ctrl_by_name(datafilereader.OCCURRENCES_RESOURCE_NAME, chief.datafiles)
     cls.external_resource = datafilereader.get_ctrl_by_name('Resu', chief.datafiles)
Exemplo n.º 24
0
 def setUp(self):
     self._chief = datafilereader.construct_chief_controller(datafilereader.SIMPLE_PROJECT)
     self._test = datafilereader.get_ctrl_by_name('Test Case', self._chief.datafiles[0].tests)
     self._keyword = datafilereader.get_ctrl_by_name('Keyword', self._chief.datafiles[0].keywords)
Exemplo n.º 25
0
 def setUp(self):
     self.project_ctrl = datafilereader.construct_project(
         datafilereader.LOG_MANY_SUITE)
     self.datafile = datafilereader.get_ctrl_by_name(
         'Log Many', self.project_ctrl.datafiles)
     self.testcase = self.datafile.tests[0]
Exemplo n.º 26
0
 def test_unused_resource_knows_it_is_unused(self):
     unused = datafilereader.get_ctrl_by_name('Unused Resource',
                                              self.chief.datafiles)
     self.assertFalse(unused.is_used())
Exemplo n.º 27
0
 def setUp(self):
     self._project = datafilereader.construct_project(datafilereader.SIMPLE_PROJECT)
     self._test = datafilereader.get_ctrl_by_name('Test Case', self._project.datafiles[0].tests)
     self._keyword = datafilereader.get_ctrl_by_name('Keyword', self._project.datafiles[0].keywords)
     print self._keyword
Exemplo n.º 28
0
 def test_used_resource_knows_it_is_used(self):
     used = datafilereader.get_ctrl_by_name('Used Resource', self.project.datafiles)
     self.assertTrue(used.is_used())
Exemplo n.º 29
0
 def _get_resource_dir(self):
     return datafilereader.get_ctrl_by_name(datafilereader.SIMPLE_TEST_SUITE_INNER_RESOURCE_DIR, self.project.datafiles)