mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 18:04:32 +02:00
parent
bf1ac778a3
commit
fb93452ea8
20 changed files with 910 additions and 849 deletions
|
|
@ -70,11 +70,12 @@ def test_update_alter(fresh_db):
|
|||
] == list(table.rows)
|
||||
|
||||
|
||||
def test_update_alter_with_invalid_column_characters(fresh_db):
|
||||
def test_update_alter_with_special_column_characters(fresh_db):
|
||||
# With double-quote escaping, columns with special characters are now valid
|
||||
table = fresh_db["table"]
|
||||
rowid = table.insert({"foo": "bar"}).last_pk
|
||||
with pytest.raises(AssertionError):
|
||||
table.update(rowid, {"new_col[abc]": 1.2}, alter=True)
|
||||
table.update(rowid, {"new_col[abc]": 1.2}, alter=True)
|
||||
assert list(table.rows) == [{"foo": "bar", "new_col[abc]": 1.2}]
|
||||
|
||||
|
||||
def test_update_with_no_values_sets_last_pk(fresh_db):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue