mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
realm: Rename plan type constants to be more descriptive.
It is confusing to have the plan type constants not be namespaced by the thing they represent. We already have a namespacing convention in place for constants, so we should use it for Realm.plan_type as well.
This commit is contained in:
@@ -357,14 +357,14 @@ class EditMessageTest(EditMessageTestCase):
|
||||
self.assertEqual(result.json()["raw_content"], "web-public message")
|
||||
|
||||
# Verify LIMITED plan type does not allow web-public access.
|
||||
do_change_plan_type(user_profile.realm, Realm.LIMITED, acting_user=None)
|
||||
do_change_plan_type(user_profile.realm, Realm.PLAN_TYPE_LIMITED, acting_user=None)
|
||||
result = self.client_get("/json/messages/" + str(web_public_stream_msg_id))
|
||||
self.assert_json_error(
|
||||
result, "Not logged in: API authentication or user session required", 401
|
||||
)
|
||||
|
||||
# Verify works with STANDARD_FREE plan type too.
|
||||
do_change_plan_type(user_profile.realm, Realm.STANDARD_FREE, acting_user=None)
|
||||
do_change_plan_type(user_profile.realm, Realm.PLAN_TYPE_STANDARD_FREE, acting_user=None)
|
||||
result = self.client_get("/json/messages/" + str(web_public_stream_msg_id))
|
||||
self.assert_json_success(result)
|
||||
self.assertEqual(result.json()["raw_content"], "web-public message")
|
||||
|
||||
Reference in New Issue
Block a user