def test_save(self): result = Population() result.id = 2 result.save() result = Population.objects.get() self.assertEqual(Population.objects.count(), 1) self.assertEqual(result.pk, 1)