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

This commit is contained in:
Tim Graham 2016-07-01 09:09:31 -04:00 committed by GitHub
parent 30c65ee818
commit 5f8da22984
1 changed files with 1 additions and 1 deletions

View File

@ -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: