From d1acd678975b7ea2a67dda80492e82f456a97f23 Mon Sep 17 00:00:00 2001 From: Zixuan James Li Date: Wed, 27 Jul 2022 16:11:00 -0400 Subject: [PATCH] test_realm: Fix realm confirmation object test case. We are no longer creating confirmation objects associated with realms directly. This should test for `RealmReactivationStatus` instead. Signed-off-by: Zixuan James Li --- zerver/tests/test_realm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zerver/tests/test_realm.py b/zerver/tests/test_realm.py index 24e3f8bcba..8723d024d2 100644 --- a/zerver/tests/test_realm.py +++ b/zerver/tests/test_realm.py @@ -374,10 +374,11 @@ class RealmTest(ZulipTestCase): realm = get_realm("zulip") do_deactivate_realm(realm, acting_user=None) self.assertTrue(realm.deactivated) - create_confirmation_link(realm, Confirmation.REALM_REACTIVATION) + obj = RealmReactivationStatus.objects.create(realm=realm) + create_confirmation_link(obj, Confirmation.REALM_REACTIVATION) confirmation = Confirmation.objects.last() assert confirmation is not None - self.assertEqual(confirmation.content_object, realm) + self.assertEqual(confirmation.content_object, obj) self.assertEqual(confirmation.realm, realm) def test_do_send_realm_reactivation_email(self) -> None: