mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 04:23:46 +00:00
timezone server tests: Verify Montreal -> Toronto.
This new test verifies that the server will canonicalize the America/Montreal timezone to America/Toronto. In general, we canonicalize via the standard Python libraries for cities that are aliases.
This commit is contained in:
@@ -496,6 +496,14 @@ class ChangeSettingsTest(ZulipTestCase):
|
||||
getattr(hamlet, invalid_value["setting_name"]), invalid_value["value"]
|
||||
)
|
||||
|
||||
def test_change_timezone_montreal(self) -> None:
|
||||
self.login("hamlet")
|
||||
data = {"timezone": "America/Montreal"}
|
||||
result = self.client_patch("/json/settings", data)
|
||||
self.assert_json_success(result)
|
||||
hamlet = self.example_user("hamlet")
|
||||
self.assertEqual(hamlet.timezone, "America/Toronto")
|
||||
|
||||
def do_change_emojiset(self, emojiset: str) -> "TestHttpResponse":
|
||||
self.login("hamlet")
|
||||
data = {"emojiset": emojiset}
|
||||
|
||||
Reference in New Issue
Block a user