mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Replaced use of TestCase.fail() with assertRaises().
Also removed try/except/fail antipattern that hides exceptions.
This commit is contained in:
parent
c1b6f554e4
commit
c9ae09addf
30 changed files with 205 additions and 447 deletions
|
@ -188,10 +188,7 @@ class ProxyModelTests(TestCase):
|
|||
|
||||
def test_permissions_created(self):
|
||||
from django.contrib.auth.models import Permission
|
||||
try:
|
||||
Permission.objects.get(name="May display users information")
|
||||
except Permission.DoesNotExist:
|
||||
self.fail("The permission 'May display users information' has not been created")
|
||||
Permission.objects.get(name="May display users information")
|
||||
|
||||
def test_proxy_model_signals(self):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue