class ModellTest(TestCase): def setUp(self): self.brand = Brand.objects.create( brand='BMW' ) self.obj = Modell( brand=self.brand, modell='X6 M' ) def test_create(self): self.obj.save() self.assertEqual(1, self.obj.pk)
def setUp(self): self.brand = Brand.objects.create( brand='BMW' ) self.obj = Modell( brand=self.brand, modell='X6 M' )