summaryrefslogtreecommitdiff
path: root/tests/proxy_models
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-06-28 11:21:26 -0400
committerTim Graham <timograham@gmail.com>2016-07-01 09:58:56 -0400
commit567cfc1601a5f475eea12bc5de53b849fa5dadea (patch)
treec471ba1af748008e4fbe9faee8cf51d4dffcd263 /tests/proxy_models
parent9c48e17480432b8723fcdcc262d8d62866e93a4f (diff)
[1.10.x] Replaced use of TestCase.fail() with assertRaises().
Also removed try/except/fail antipattern that hides exceptions. Backport of c9ae09addffb839403312131d4251e9d8b454508 from master
Diffstat (limited to 'tests/proxy_models')
-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 ecbb70c7c4..5d8ba18dd8 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):
"""