def test_function_classname_is_module(self): fun = functions.Functions(session=self.session) fun.register() def test_func(): pass cases = fun._createTests(test_func) self.assertEqual(len(cases), 1) cases[0](self.result) xml = self.plugin.tree.findall('testcase') self.assertEqual(len(xml), 1) self.assertTrue(xml[0].get('classname').endswith('test_junitxml'))
def setUp(self): self.session = session.Session() self.loader = loader.PluggableTestLoader(self.session) self.plugin = functions.Functions(session=self.session)