def setUp(self): ptfunctiondata = { 'code': 'test_code', 'modelName': 'name of model', 'arguments': 'test arguments', 'functionBody': 'body of function', 'tag': 'test tag', 'description': 'description of function' } self.ptFunction = PtFunction(**ptfunctiondata) self.ptFunction.save()
class PtFunctionTest(TestCase): def setUp(self): ptfunctiondata = { 'code': 'test_code', 'modelName': 'name of model', 'arguments': 'test arguments', 'functionBody': 'body of function', 'tag': 'test tag', 'description': 'description of function' } self.ptFunction = PtFunction(**ptfunctiondata) self.ptFunction.save() def tearDown(self): self.ptFunction.delete() def test_verifying_string_representation(self): self.assertEqual(self.ptFunction.code + '.' + self.ptFunction.tag, str(self.ptFunction))