gh-123849: Fix test_sqlite3.test_table_dump when foreign keys are enabled by default (#123859)

This commit is contained in:
Mariusz Felisiak 2024-10-09 00:46:11 +02:00 committed by GitHub
parent 37228bd16e
commit 14b44c58e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ class DumpTests(MemoryDatabaseMixin, unittest.TestCase):
def test_table_dump(self):
expected_sqls = [
"PRAGMA foreign_keys=OFF;",
"""CREATE TABLE "index"("index" blob);"""
,
"""INSERT INTO "index" VALUES(X'01');"""
@ -48,7 +49,7 @@ class DumpTests(MemoryDatabaseMixin, unittest.TestCase):
expected_sqls = [
"PRAGMA foreign_keys=OFF;",
"BEGIN TRANSACTION;",
*expected_sqls,
*expected_sqls[1:],
"COMMIT;",
]
[self.assertEqual(expected_sqls[i], actual_sqls[i])