From 05155bf9cf938b062a93e38f1908c70cd0116c69 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Sep 30 2024 14:46:29 +0000 Subject: fix unit tests --- diff --git a/tests/test_www/test_util.py b/tests/test_www/test_util.py index b6b9c57..de1e37f 100644 --- a/tests/test_www/test_util.py +++ b/tests/test_www/test_util.py @@ -33,7 +33,7 @@ class TestFormatMode(unittest.TestCase): ) for input, output in formats: - self.assertEqual(formatLink(input), output) + self.assertEqual(str(formatLink(input)), output) def test_escape_html(self): tests = ( diff --git a/www/lib/kojiweb/util.py b/www/lib/kojiweb/util.py index c5296e9..31141af 100644 --- a/www/lib/kojiweb/util.py +++ b/www/lib/kojiweb/util.py @@ -898,7 +898,7 @@ def _parse_value(key, value, sep=', '): if key in ('brootid', 'buildroot_id'): # do the escaping ourselves since we include html need_escape = False - brid = urllib.parse.quote(value) + brid = urllib.parse.quote(str(value)) _str = escapeHTML(value) begin_tag = '' % brid end_tag = ''