mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-16 05:24:26 +02:00
Applied Black
This commit is contained in:
parent
fe7cb7e8aa
commit
99d931ed4a
1 changed files with 8 additions and 2 deletions
|
|
@ -88,7 +88,13 @@ def test_transform_sql(fresh_db, params, expected_sql):
|
|||
def test_transform_sql_rowid_to_id(fresh_db):
|
||||
dogs = fresh_db["dogs"]
|
||||
dogs.insert({"id": 1, "name": "Cleo", "age": "5"})
|
||||
assert dogs.schema == 'CREATE TABLE [dogs] (\n [id] INTEGER,\n [name] TEXT,\n [age] TEXT\n)'
|
||||
assert (
|
||||
dogs.schema
|
||||
== "CREATE TABLE [dogs] (\n [id] INTEGER,\n [name] TEXT,\n [age] TEXT\n)"
|
||||
)
|
||||
dogs.transform(pk="id")
|
||||
# Slight oddity: [dogs] becomes "dogs" during the rename:
|
||||
assert dogs.schema == 'CREATE TABLE "dogs" (\n [id] INTEGER PRIMARY KEY,\n [name] TEXT,\n [age] TEXT\n)'
|
||||
assert (
|
||||
dogs.schema
|
||||
== 'CREATE TABLE "dogs" (\n [id] INTEGER PRIMARY KEY,\n [name] TEXT,\n [age] TEXT\n)'
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue