mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Replaced use of TestCase.fail() with assertRaises().
Also removed try/except/fail antipattern that hides exceptions.
This commit is contained in:
parent
c1b6f554e4
commit
c9ae09addf
30 changed files with 205 additions and 447 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue