From 7222ade0dd252380fb158bb9b1ca1fefec3899a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Fri, 18 Mar 2022 16:11:07 +0100 Subject: xep_0454: Ensure format_url returns a str MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- tests/test_xep_0454.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/test_xep_0454.py b/tests/test_xep_0454.py index 3d0860a9..8d43c7e3 100644 --- a/tests/test_xep_0454.py +++ b/tests/test_xep_0454.py @@ -32,4 +32,10 @@ class TestMediaSharing(SlixTest): self.assertEqual(plain, result) + def testFormatURL(self): + url = 'https://foo.bar' + fragment = 'a' * 88 + result = XEP_0454.format_url(url, fragment) + self.assertEqual('aesgcm://foo.bar#' + 'a' * 88, result) + suite = unittest.TestLoader().loadTestsFromTestCase(TestMediaSharing) -- cgit v1.2.3