diff options
Diffstat (limited to 'test/no_gui')
-rw-r--r-- | test/no_gui/test_styling.py | 14 | ||||
-rw-r--r-- | test/no_gui/test_text_helpers.py | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/no_gui/test_styling.py b/test/no_gui/test_styling.py index bef896350..86ba4c7f6 100644 --- a/test/no_gui/test_styling.py +++ b/test/no_gui/test_styling.py @@ -347,7 +347,7 @@ URIS = [ 'http://مثال.إختبار', 'http://例子.测试', 'http://उदाहरण.परीक्षा', - 'http://-.~_!$&\'()*+,;=:%40:80%2f::::::@example.com', + "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com", 'http://1337.net', 'http://a.b-c.de', 'http://223.255.255.254', @@ -530,33 +530,33 @@ class Test(unittest.TestCase): for uri in URIS: text = self.wrap(uri) hlinks = process_uris(text) - self.assertEqual([l.uri for l in hlinks], [uri], text) + self.assertEqual([link.uri for link in hlinks], [uri], text) def test_invalid_uris(self): for foo in NONURIS + UNACCEPTABLE_URIS: text = self.wrap(foo) hlinks = process_uris(text) - self.assertEqual([l.text for l in hlinks], [], text) + self.assertEqual([link.text for link in hlinks], [], text) def test_jids(self): for jid in JIDS: text = self.wrap(jid) uri = jid_to_iri(jid) hlinks = process_uris(text) - self.assertEqual([(l.text, l.uri) for l in hlinks], + self.assertEqual([(link.text, link.uri) for link in hlinks], [(jid, uri)], text) def test_nonjids(self): for foo in NONJIDS: text = self.wrap(foo) hlinks = process_uris(text) - self.assertEqual([l.text for l in hlinks], [], text) + self.assertEqual([link.text for link in hlinks], [], text) def test_uris_with_text(self): for text, results in URIS_WITH_TEXT: hlinks = process_uris(text) - self.assertEqual([l.text for l in hlinks], results, text) + self.assertEqual([link.text for link in hlinks], results, text) -if __name__ == "__main__": +if __name__ == '__main__': unittest.main() diff --git a/test/no_gui/test_text_helpers.py b/test/no_gui/test_text_helpers.py index 5f3b0d995..86897829c 100644 --- a/test/no_gui/test_text_helpers.py +++ b/test/no_gui/test_text_helpers.py @@ -13,7 +13,7 @@ class Test(unittest.TestCase): self.assertEqual( escape_iri_path_segment(''.join(chr(c) for c in range(0x20,0x7F))), - '%20!%22%23$%25&\'()*+,-.%2F0123456789:;%3C=%3E%3F@ABCDEFGHIJKLMN' + "%20!%22%23$%25&'()*+,-.%2F0123456789:;%3C=%3E%3F@ABCDEFGHIJKLMN" 'OPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~', 'ASCII printable') |