mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 09:54:31 +02:00
parent
607a2a9ff6
commit
cfbc09967e
3 changed files with 47 additions and 6 deletions
|
|
@ -668,7 +668,9 @@ def test_insert_hash_id(fresh_db):
|
|||
assert "f501265970505d9825d8d9f590bfab3519fb20b1" == id
|
||||
assert 1 == dogs.count
|
||||
# Insert replacing a second time should not create a new row
|
||||
id2 = dogs.insert({"name": "Cleo", "twitter": "cleopaws"}, hash_id="id", replace=True).last_pk
|
||||
id2 = dogs.insert(
|
||||
{"name": "Cleo", "twitter": "cleopaws"}, hash_id="id", replace=True
|
||||
).last_pk
|
||||
assert "f501265970505d9825d8d9f590bfab3519fb20b1" == id2
|
||||
assert 1 == dogs.count
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue