示例#1
0
 def test_delete_by_user_no_effect_for_user_with_no_name_change(self):
     record_was_deleted = PendingNameChange.delete_by_user_value(
         self.user2, field='user')
     assert not record_was_deleted
     assert 1 == len(PendingNameChange.objects.all())
示例#2
0
 def test_delete_by_user_removes_pending_name_change(self):
     record_was_deleted = PendingNameChange.delete_by_user_value(
         self.user, field='user')
     assert record_was_deleted
     assert 0 == len(PendingNameChange.objects.all())
示例#3
0
 def test_delete_by_user_no_effect_for_user_with_no_name_change(self):
     record_was_deleted = PendingNameChange.delete_by_user_value(
         self.user2, field='user')
     self.assertFalse(record_was_deleted)
     self.assertEqual(1, len(PendingNameChange.objects.all()))
示例#4
0
 def test_delete_by_user_removes_pending_name_change(self):
     do_name_change_request(self.user, self.new_name, self.rationale)
     record_was_deleted = PendingNameChange.delete_by_user_value(
         self.user, field='user')
     assert record_was_deleted
     assert 0 == len(PendingNameChange.objects.all())
示例#5
0
 def test_delete_by_user_removes_pending_name_change(self):
     record_was_deleted = PendingNameChange.delete_by_user_value(
         self.user, field='user')
     self.assertTrue(record_was_deleted)
     self.assertEqual(0, len(PendingNameChange.objects.all()))