Django Unit Test – IDs of created objects
Django Unit Test – IDs of created objects Question: Sample models.py models.py class Food(models.Model): name = models.CharField(max_length=50, verbose_name=’Food’) def __str__(self): return self.name Suppose that I have written unit test/s: from django.test import TestCase from myapp.models import Food class TestWhateverFunctions(TestCase): “”” This class contains tests for whatever functions. “”” def setUp(self): “”” This method runs before …