mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
This commit is contained in:
parent
f909fa84be
commit
b5f0b3478d
27 changed files with 84 additions and 104 deletions
|
|
@ -1005,7 +1005,7 @@ class ViewLoadingTests(SimpleTestCase):
|
|||
def test_exceptions(self):
|
||||
# A missing view (identified by an AttributeError) should raise
|
||||
# ViewDoesNotExist, ...
|
||||
with six.assertRaisesRegex(self, ViewDoesNotExist, ".*View does not exist in.*"):
|
||||
with self.assertRaisesMessage(ViewDoesNotExist, "View does not exist in"):
|
||||
get_callable('urlpatterns_reverse.views.i_should_not_exist')
|
||||
# ... but if the AttributeError is caused by something else don't
|
||||
# swallow it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue