tests: Add coverage to actions/create_realm.py.

This commit adds test coverage to actions/create_realm.py.
The file is also removed from not_yet_fully_covered list
since it has 100% coverage now.
This commit is contained in:
Sahil Batra 2023-05-09 23:52:37 +05:30 committed by Tim Abbott
parent 5e7d49d129
commit 9fa67f0fa9
2 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,6 @@ not_yet_fully_covered = [
"analytics/views/stats.py", "analytics/views/stats.py",
"analytics/views/support.py", "analytics/views/support.py",
# Major lib files should have 100% coverage # Major lib files should have 100% coverage
"zerver/actions/create_realm.py",
"zerver/actions/message_edit.py", "zerver/actions/message_edit.py",
"zerver/actions/presence.py", "zerver/actions/presence.py",
"zerver/lib/addressee.py", "zerver/lib/addressee.py",

View File

@ -897,6 +897,7 @@ class RealmTest(ZulipTestCase):
invite_required=False, invite_required=False,
plan_type=Realm.PLAN_TYPE_STANDARD_FREE, plan_type=Realm.PLAN_TYPE_STANDARD_FREE,
org_type=Realm.ORG_TYPES["community"]["id"], org_type=Realm.ORG_TYPES["community"]["id"],
enable_read_receipts=True,
) )
self.assertEqual(realm.string_id, "realm_string_id") self.assertEqual(realm.string_id, "realm_string_id")
self.assertEqual(realm.name, "realm name") self.assertEqual(realm.name, "realm name")
@ -906,6 +907,7 @@ class RealmTest(ZulipTestCase):
self.assertEqual(realm.plan_type, Realm.PLAN_TYPE_STANDARD_FREE) self.assertEqual(realm.plan_type, Realm.PLAN_TYPE_STANDARD_FREE)
self.assertEqual(realm.org_type, Realm.ORG_TYPES["community"]["id"]) self.assertEqual(realm.org_type, Realm.ORG_TYPES["community"]["id"])
self.assertEqual(realm.date_created, date_created) self.assertEqual(realm.date_created, date_created)
self.assertEqual(realm.enable_read_receipts, True)
self.assertTrue( self.assertTrue(
RealmAuditLog.objects.filter( RealmAuditLog.objects.filter(