def test_does_nothing(self): form = AdminEventForm(self.form_data) form.save_m2m() self.assertEqual(Event.objects.count(), 0)
def test_new_obj(self): form = AdminEventForm(self.form_data) form.is_valid() form.save() self.assertEqual(Event.objects.count(), 1)