1
0
mirror of https://github.com/django/django.git synced 2025-10-25 22:56:12 +00:00

[1.10.x] Replaced use of TestCase.fail() with assertRaises().

Also removed try/except/fail antipattern that hides exceptions.

Backport of c9ae09addf from master
This commit is contained in:
Tim Graham
2016-06-28 11:21:26 -04:00
parent 9c48e17480
commit 567cfc1601
30 changed files with 205 additions and 447 deletions

View File

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