def setUp(self): customdefinitiondata = { 'code': 'test_code', 'description': 'description protodefinition', 'metaDefinition': 'metadef', 'active': True, 'overWrite': True } self.customDefinition = CustomDefinition(**customdefinitiondata) self.customDefinition.save()
class CustomDefinitionTest(TestCase): def setUp(self): customdefinitiondata = { 'code': 'test_code', 'description': 'description protodefinition', 'metaDefinition': 'metadef', 'active': True, 'overWrite': True } self.customDefinition = CustomDefinition(**customdefinitiondata) self.customDefinition.save() def tearDown(self): self.customDefinition.delete() def test_verifying_string_representation(self): self.assertEqual('test_code', str(self.customDefinition))