Esempio n. 1
0
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)
Esempio n. 2
0
 def setUp(self):
     self.brand = Brand.objects.create(
         brand='BMW'
     )
     self.obj = Modell(
         brand=self.brand,
         modell='X6 M'
     )