Exemple #1
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.resu = datafilereader.get_ctrl_by_name(
         datafilereader.SIMPLE_TEST_SUITE_RESOURCE_NAME,
         cls.project_ctrl.datafiles)
Exemple #2
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.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')
 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())
 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'))
 def _get_resource_dir(self):
     return datafilereader.get_ctrl_by_name(
         datafilereader.SIMPLE_TEST_SUITE_INNER_RESOURCE_DIR,
         self.project.datafiles)
 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]
 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)
 def _get_ctrl_by_name(self, name):
     return datafilereader.get_ctrl_by_name(name, self.project.datafiles)
 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())