summaryrefslogtreecommitdiff
path: root/tests/swappable_models
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/swappable_models
parentc1b6f554e405fe733e8d80f7e3d77c277810e707 (diff)
downloaddjango-c9ae09addffb839403312131d4251e9d8b454508.tar.gz
Replaced use of TestCase.fail() with assertRaises().
Also removed try/except/fail antipattern that hides exceptions.
Diffstat (limited to 'tests/swappable_models')
-rw-r--r--tests/swappable_models/tests.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/swappable_models/tests.py b/tests/swappable_models/tests.py
index 9ba684170c..9fd6a15942 100644
--- a/tests/swappable_models/tests.py
+++ b/tests/swappable_models/tests.py
@@ -44,9 +44,5 @@ class SwappableModelTests(TestCase):
@override_settings(TEST_ARTICLE_MODEL='swappable_models.article')
def test_case_insensitive(self):
"Model names are case insensitive. Check that model swapping honors this."
- try:
- Article.objects.all()
- except AttributeError:
- self.fail('Swappable model names should be case insensitive.')
-
+ Article.objects.all()
self.assertIsNone(Article._meta.swapped)