Kaydet (Commit) 5f8da229 authored tarafından Tim Graham's avatar Tim Graham Kaydeden (comit) GitHub

Fixed a urlpatterns_reverse test on Python 2 non-ASCII path.

üst 30c65ee8
......@@ -396,7 +396,7 @@ class ResolverTests(SimpleTestCase):
[{'type': RegexURLResolver}, {'type': RegexURLPattern, 'name': None}],
[{'type': RegexURLResolver}, {'type': RegexURLResolver}],
]
with self.assertRaisesMessage(Resolver404, "tried") as cm:
with self.assertRaisesMessage(Resolver404, b'tried' if six.PY2 else 'tried') as cm:
resolve('/included/non-existent-url', urlconf=urls)
e = cm.exception
# make sure we at least matched the root ('/') url resolver:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment