I just wrote some tests case about my forms, here is one :
def test_department_admin_creation(self):
nb = Department.objects.count()
response = self.client.post(self.url, {"name" : 'department', "organization" : self.organization})
self.assertEqual(response.status_code, 200)
self.assertEqual(nb+1,Department.objects.count())
And I'm wondering why the last assertion doesn't work while the status_code's one did.
Thank you !
Aucun commentaire:
Enregistrer un commentaire