Permalink
Browse files

fix failing unicode keys

  • Loading branch information...
1 parent 992dfd4 commit 591ace60275491f48e84c61735dc301da560a7e2 @glyphobet glyphobet committed Apr 10, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 tests/test_template.py
  2. +1 −1 uricore/template.py
View
@@ -209,5 +209,5 @@ def test_iri_template():
IRI.from_template(u'http://{domain}/', domain=u"\N{SNOWMAN}"))
def test_crazy_keys():
- yield check_template, "{?unicode_keys*}", u"?gro\xdf=great"
- yield check_template, "{?numeric_keys*}", u"?1=hello"
+ yield check_template, "{?unicode_keys*}", "?gro%C3%9F=great"
+ yield check_template, "{?numeric_keys*}", "?1=hello"
View
@@ -26,7 +26,7 @@ def _format_mapping(operator, item):
else:
mid = '='
- return "{0}{1}{2}".format(k, mid, v)
+ return "{0}{1}{2}".format(urls.url_quote(k, safe=safe), mid, v)
else:
return "{0}".format(v)

0 comments on commit 591ace6

Please sign in to comment.