mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.5.x] Updated deprecated test assertions
This commit is contained in:
@@ -186,7 +186,7 @@ class PermissionDuplicationTestCase(TestCase):
|
||||
# check duplicated default permission
|
||||
models.Permission._meta.permissions = [
|
||||
('change_permission', 'Can edit permission (duplicate)')]
|
||||
self.assertRaisesRegexp(CommandError,
|
||||
six.assertRaisesRegex(self, CommandError,
|
||||
"The permission codename 'change_permission' clashes with a "
|
||||
"builtin permission for model 'auth.Permission'.",
|
||||
create_permissions, models, [], verbosity=0)
|
||||
@@ -197,7 +197,7 @@ class PermissionDuplicationTestCase(TestCase):
|
||||
('other_one', 'Some other permission'),
|
||||
('my_custom_permission', 'Some permission with duplicate permission code'),
|
||||
]
|
||||
self.assertRaisesRegexp(CommandError,
|
||||
six.assertRaisesRegex(self, CommandError,
|
||||
"The permission codename 'my_custom_permission' is duplicated for model "
|
||||
"'auth.Permission'.",
|
||||
create_permissions, models, [], verbosity=0)
|
||||
|
||||
Reference in New Issue
Block a user