mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-11-20 17:09:46 +01:00
Reformatted with black
This commit is contained in:
parent
a0f0175d64
commit
f0f15d3dc8
1 changed files with 8 additions and 2 deletions
|
|
@ -18,7 +18,13 @@ def test_upsert_all(fresh_db):
|
||||||
|
|
||||||
def test_upsert_compound_primary_key(fresh_db):
|
def test_upsert_compound_primary_key(fresh_db):
|
||||||
table = fresh_db["table"]
|
table = fresh_db["table"]
|
||||||
table.upsert_all([{"species": "dog", "id": 1, "name": "Cleo", "age": 4}, {"species": "cat", "id": 1, "name": "Catbag"}], pk=("species", "id"))
|
table.upsert_all(
|
||||||
|
[
|
||||||
|
{"species": "dog", "id": 1, "name": "Cleo", "age": 4},
|
||||||
|
{"species": "cat", "id": 1, "name": "Catbag"},
|
||||||
|
],
|
||||||
|
pk=("species", "id"),
|
||||||
|
)
|
||||||
table.upsert_all([{"species": "dog", "id": 1, "age": 5}], pk=("species", "id"))
|
table.upsert_all([{"species": "dog", "id": 1, "age": 5}], pk=("species", "id"))
|
||||||
assert [
|
assert [
|
||||||
{"species": "dog", "id": 1, "name": "Cleo", "age": 5},
|
{"species": "dog", "id": 1, "name": "Cleo", "age": 5},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue