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:
Steve Howell
2025-01-22 11:40:02 +00:00
committed by Tim Abbott
parent 92376fc133
commit fe39f94e52

View File

@@ -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}