diff --git a/hyde/tests/ext/test_textlinks.py b/hyde/tests/ext/test_textlinks.py index f06aa49..fd214c2 100644 --- a/hyde/tests/ext/test_textlinks.py +++ b/hyde/tests/ext/test_textlinks.py @@ -7,6 +7,7 @@ Use nose from hyde.fs import File, Folder from hyde.generator import Generator from hyde.site import Site +from urllib import quote from pyquery import PyQuery @@ -56,5 +57,5 @@ class TestTextlinks(object): html = f.read_all() assert html for name, path in d.items(): - assert site.config.base_url + path in html + assert quote(site.config.base_url + path) in html assert '/media/img/hyde-logo.png' in html \ No newline at end of file diff --git a/hyde/tests/test_site.py b/hyde/tests/test_site.py index a64b7b9..181d697 100644 --- a/hyde/tests/test_site.py +++ b/hyde/tests/test_site.py @@ -5,6 +5,7 @@ Use nose `$ nosetests` """ import yaml +from urllib import quote from hyde.fs import File, Folder from hyde.model import Config, Expando @@ -60,9 +61,9 @@ def test_node_full_url(): r = RootNode(TEST_SITE_ROOT.child_folder('content'), s) assert not r.module n = r.add_node(TEST_SITE_ROOT.child_folder('content/blog')) - assert n.full_url == 'http://localhost/blog' + assert n.full_url == quote('http://localhost/blog') c = r.add_node(TEST_SITE_ROOT.child_folder('content/blog/2010/december')) - assert c.full_url == 'http://localhost/blog/2010/december' + assert c.full_url == quote('http://localhost/blog/2010/december') def test_node_relative_path(): s = Site(TEST_SITE_ROOT)