body is now a TextFilePointer
This commit is contained in:
+8
-5
@@ -1,3 +1,5 @@
|
||||
from tempfile import TemporaryDirectory
|
||||
|
||||
import pytest
|
||||
from grung.db import GrungDB
|
||||
from tinydb import where
|
||||
@@ -9,11 +11,12 @@ from ttfrog import schema
|
||||
|
||||
@pytest.fixture
|
||||
def app():
|
||||
fixture_db = GrungDB.with_schema(schema, storage=MemoryStorage)
|
||||
ttfrog.app.load_config(defaults=None, IN_MEMORY_DB=1)
|
||||
ttfrog.app.initialize(db=fixture_db, force=True)
|
||||
yield ttfrog.app
|
||||
ttfrog.app.db.truncate()
|
||||
with TemporaryDirectory() as path:
|
||||
fixture_db = GrungDB.with_schema(schema, path=path, storage=MemoryStorage)
|
||||
ttfrog.app.load_config(defaults=None, IN_MEMORY_DB=1)
|
||||
ttfrog.app.initialize(db=fixture_db, force=True)
|
||||
yield ttfrog.app
|
||||
ttfrog.app.db.truncate()
|
||||
|
||||
|
||||
def test_create(app):
|
||||
|
||||
Reference in New Issue
Block a user