mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Fixed #26747 -- Used more specific assertions in the Django test suite.
This commit is contained in:
parent
ea34426ae7
commit
4f336f6652
87 changed files with 406 additions and 406 deletions
|
|
@ -85,7 +85,7 @@ class ModelInstanceCreationTests(TestCase):
|
|||
a = Article(headline='Article 5', pub_date=datetime(2005, 7, 31))
|
||||
a.save()
|
||||
self.assertEqual(a.headline, 'Article 5')
|
||||
self.assertNotEqual(a.id, None)
|
||||
self.assertIsNotNone(a.id)
|
||||
|
||||
def test_leaving_off_a_field_with_default_set_the_default_will_be_saved(self):
|
||||
a = Article(pub_date=datetime(2005, 7, 31))
|
||||
|
|
@ -358,7 +358,7 @@ class ModelTest(TestCase):
|
|||
with self.assertRaises(TypeError):
|
||||
EmptyQuerySet()
|
||||
self.assertIsInstance(Article.objects.none(), EmptyQuerySet)
|
||||
self.assertFalse(isinstance('', EmptyQuerySet))
|
||||
self.assertNotIsInstance('', EmptyQuerySet)
|
||||
|
||||
def test_emptyqs_values(self):
|
||||
# test for #15959
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue