From c9ae09addffb839403312131d4251e9d8b454508 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 28 Jun 2016 11:21:26 -0400 Subject: Replaced use of TestCase.fail() with assertRaises(). Also removed try/except/fail antipattern that hides exceptions. --- tests/swappable_models/tests.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tests/swappable_models') 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) -- cgit v1.2.1