def test_delete_by_user_no_effect_for_user_with_no_email_change(self): record_was_deleted = PendingEmailChange.delete_by_user_value( self.user2, field='user') assert not record_was_deleted assert 1 == len(PendingEmailChange.objects.all())
def test_delete_by_user_no_effect_for_user_with_no_email_change(self): record_was_deleted = PendingEmailChange.delete_by_user_value( self.user2, field='user') self.assertFalse(record_was_deleted) self.assertEqual(1, len(PendingEmailChange.objects.all()))
def test_delete_by_user_removes_pending_email_change(self): record_was_deleted = PendingEmailChange.delete_by_user_value( self.user, field='user') assert record_was_deleted assert 0 == len(PendingEmailChange.objects.all())
def test_delete_by_user_removes_pending_email_change(self): record_was_deleted = PendingEmailChange.delete_by_user_value( self.user, field='user') self.assertTrue(record_was_deleted) self.assertEqual(0, len(PendingEmailChange.objects.all()))