1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Relaxed some query ordering assertions in various tests.

It accounts for differences seen on MySQL with MyISAM storage engine.
This commit is contained in:
Mariusz Felisiak
2022-04-14 12:12:13 +02:00
committed by GitHub
parent 08f30d1b6a
commit 1760ad4e8c
16 changed files with 55 additions and 49 deletions

View File

@@ -99,7 +99,7 @@ class LiveServerTestCloseConnectionTest(LiveServerBase):
self.assertIsNotNone(conn.connection)
with self.urlopen("/model_view/") as f:
# The server can access the database.
self.assertEqual(f.read().splitlines(), [b"jane", b"robert"])
self.assertCountEqual(f.read().splitlines(), [b"jane", b"robert"])
# Wait for the server's request thread to close the connection.
# A timeout of 0.1 seconds should be more than enough. If the wait
# times out, the assertion after should fail.
@@ -320,7 +320,7 @@ class LiveServerDatabase(LiveServerBase):
Fixtures are properly loaded and visible to the live server thread.
"""
with self.urlopen("/model_view/") as f:
self.assertEqual(f.read().splitlines(), [b"jane", b"robert"])
self.assertCountEqual(f.read().splitlines(), [b"jane", b"robert"])
def test_database_writes(self):
"""