コード例 #1
0
ファイル: test_models.py プロジェクト: rmulder/edx-platform
 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
ファイル: test_models.py プロジェクト: rmulder/edx-platform
 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()))