aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_application.py
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2023-03-28 18:53:15 +0100
committerTomasz Kramkowski <tomasz@kramkow.ski>2023-03-28 20:10:48 +0100
commitd198fca95919cc78275d3d9fa8f1b0a8acfdbab3 (patch)
treec5e01750f40310df6a365da94b7e76ef540f8a27 /tests/test_application.py
parenta4669636144bf1f3d61bb5af80e23841f2ad8481 (diff)
downloadpaste-d198fca95919cc78275d3d9fa8f1b0a8acfdbab3.tar.gz
paste-d198fca95919cc78275d3d9fa8f1b0a8acfdbab3.tar.xz
paste-d198fca95919cc78275d3d9fa8f1b0a8acfdbab3.zip
Switch back to centralised opening of the database
Create Store instances when needed This will make more sense with following commits
Diffstat (limited to 'tests/test_application.py')
-rw-r--r--tests/test_application.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_application.py b/tests/test_application.py
index e86d937..20cbeac 100644
--- a/tests/test_application.py
+++ b/tests/test_application.py
@@ -4,15 +4,15 @@ import pytest
from webtest import TestApp
import paste.db
-import paste.store
from paste import __main__, application
+from paste.store import Store
DB = "file::memory:?cache=shared"
@pytest.fixture
def db():
- with paste.store.open(DB) as d:
+ with paste.db.connect(DB) as d:
yield d
@@ -25,7 +25,7 @@ def app(db):
@pytest.fixture
def token(db):
- return b64encode(db.generate_token()).decode()
+ return b64encode(Store(db).generate_token()).decode()
@pytest.mark.parametrize("method", ["put", "post", "delete"])