mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 18:04:32 +02:00
replace=True and ignore=True parameters for create_view(), closes #106
This commit is contained in:
parent
b4d953d3cc
commit
5c1df4e306
4 changed files with 70 additions and 15 deletions
|
|
@ -716,13 +716,6 @@ def test_insert_hash_id(fresh_db):
|
|||
assert 1 == dogs.count
|
||||
|
||||
|
||||
def test_create_view(fresh_db):
|
||||
fresh_db["data"].insert({"foo": "foo", "bar": "bar"})
|
||||
fresh_db.create_view("bar", "select bar from data")
|
||||
rows = fresh_db.conn.execute("select * from bar").fetchall()
|
||||
assert [("bar",)] == rows
|
||||
|
||||
|
||||
def test_vacuum(fresh_db):
|
||||
fresh_db["data"].insert({"foo": "foo", "bar": "bar"})
|
||||
fresh_db.vacuum()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue