mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-08-13 21:04:10 +02:00
Use db.table() and db.view() in tests, closes #838
This commit is contained in:
parent
43d5d3331f
commit
38fe466700
43 changed files with 1321 additions and 1254 deletions
|
|
@ -6,10 +6,10 @@ def test_attach(tmpdir):
|
|||
bar_path = str(tmpdir / "bar.db")
|
||||
db = Database(foo_path)
|
||||
with db.conn:
|
||||
db["foo"].insert({"id": 1, "text": "foo"})
|
||||
db.table("foo").insert({"id": 1, "text": "foo"})
|
||||
db2 = Database(bar_path)
|
||||
with db2.conn:
|
||||
db2["bar"].insert({"id": 1, "text": "bar"})
|
||||
db2.table("bar").insert({"id": 1, "text": "bar"})
|
||||
db.attach("bar", bar_path)
|
||||
assert db.execute(
|
||||
"select * from foo union all select * from bar.bar"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue