mirror of
https://github.com/enpaul/peewee-plus.git
synced 2024-12-23 08:13:28 +00:00
19 lines
348 B
Python
19 lines
348 B
Python
import uuid
|
|
|
|
import peewee
|
|
import pytest
|
|
|
|
import peewee_plus
|
|
|
|
|
|
@pytest.fixture(scope="function")
|
|
def fakedb(tmp_path):
|
|
"""Create a temporary pho-database (fakedb) for testing fields"""
|
|
|
|
sqlite = peewee.SqliteDatabase(
|
|
str(tmp_path / f"{uuid.uuid4()}.db"),
|
|
pragmas=peewee_plus.SQLITE_DEFAULT_PRAGMAS,
|
|
)
|
|
|
|
yield sqlite
|