mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Replaced use of TestCase.fail() with assertRaises().
Also removed try/except/fail antipattern that hides exceptions.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user