mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Fixed #23620 -- Used more specific assertions in the Django test suite.
This commit is contained in:
parent
c0c78f1b70
commit
f7969b0920
83 changed files with 419 additions and 429 deletions
|
|
@ -6,10 +6,10 @@ from .models import Empty
|
|||
class EmptyModelTests(TestCase):
|
||||
def test_empty(self):
|
||||
m = Empty()
|
||||
self.assertEqual(m.id, None)
|
||||
self.assertIsNone(m.id)
|
||||
m.save()
|
||||
Empty.objects.create()
|
||||
self.assertEqual(len(Empty.objects.all()), 2)
|
||||
self.assertTrue(m.id is not None)
|
||||
self.assertIsNotNone(m.id)
|
||||
existing = Empty(m.id)
|
||||
existing.save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue