mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #23620 -- Used more specific assertions in the Django test suite.
This commit is contained in:
committed by
Tim Graham
parent
c0c78f1b70
commit
f7969b0920
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user