summaryrefslogtreecommitdiff
path: root/tests/proxy_models/tests.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-06-28 11:21:26 -0400
committerGitHub <noreply@github.com>2016-06-28 11:21:26 -0400
commitc9ae09addffb839403312131d4251e9d8b454508 (patch)
tree74913fbe2e90d88e094f8594947ebf313ec5f12f /tests/proxy_models/tests.py
parentc1b6f554e405fe733e8d80f7e3d77c277810e707 (diff)
Replaced use of TestCase.fail() with assertRaises().
Also removed try/except/fail antipattern that hides exceptions.
Diffstat (limited to 'tests/proxy_models/tests.py')
-rw-r--r--tests/proxy_models/tests.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/proxy_models/tests.py b/tests/proxy_models/tests.py
index 833cdf3956..66e7210dd4 100644
--- a/tests/proxy_models/tests.py
+++ b/tests/proxy_models/tests.py
@@ -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):
"""