mirror of
https://github.com/django/django.git
synced 2025-10-27 23:56:08 +00:00
[1.10.x] Replaced use of TestCase.fail() with assertRaises().
Also removed try/except/fail antipattern that hides exceptions.
Backport of c9ae09addf from master
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