mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
[3.13] gh-123849: Fix test_sqlite3.test_table_dump when foreign keys are enabled by default (GH-123859) (#125163)
(cherry picked from commit 14b44c58e1
)
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
This commit is contained in:
parent
094d95f62c
commit
98655cec0e
1 changed files with 2 additions and 1 deletions
|
@ -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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue