replace=True and ignore=True parameters for create_view(), closes #106

This commit is contained in:
Simon Willison 2020-05-02 09:02:04 -07:00
commit 5c1df4e306
4 changed files with 70 additions and 15 deletions

View file

@ -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()