mirror of https://github.com/zulip/zulip.git
14 lines
465 B
Python
14 lines
465 B
Python
|
import orjson
|
||
|
|
||
|
from zerver.lib.test_classes import ZulipTestCase
|
||
|
from zerver.lib.url_decoding import is_same_server_message_link
|
||
|
|
||
|
|
||
|
class URLDecodeTest(ZulipTestCase):
|
||
|
def test_is_same_server_message_link(self) -> None:
|
||
|
tests = orjson.loads(self.fixture_data("message_link_test_cases.json"))
|
||
|
for test in tests:
|
||
|
self.assertEqual(
|
||
|
is_same_server_message_link(test["message_link"]), test["expected_output"]
|
||
|
)
|