mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +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
|
@ -392,7 +392,7 @@ class SequenceResetTest(TestCase):
|
|||
# If we create a new object now, it should have a PK greater
|
||||
# than the PK we specified manually.
|
||||
obj = models.Post.objects.create(name='New post', text='goodbye world')
|
||||
self.assertTrue(obj.pk > 10)
|
||||
self.assertGreater(obj.pk, 10)
|
||||
|
||||
|
||||
# This test needs to run outside of a transaction, otherwise closing the
|
||||
|
@ -413,12 +413,12 @@ class ConnectionCreatedSignalTest(TransactionTestCase):
|
|||
connection_created.connect(receiver)
|
||||
connection.close()
|
||||
connection.cursor()
|
||||
self.assertTrue(data["connection"].connection is connection.connection)
|
||||
self.assertIs(data["connection"].connection, connection.connection)
|
||||
|
||||
connection_created.disconnect(receiver)
|
||||
data.clear()
|
||||
connection.cursor()
|
||||
self.assertTrue(data == {})
|
||||
self.assertEqual(data, {})
|
||||
|
||||
|
||||
class EscapingChecks(TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue