mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02:00
feat: Query Filter Builder for Cookbooks and Meal Plans (#4346)
This commit is contained in:
parent
2a9a6fa5e6
commit
b8e62ab8dd
47 changed files with 2043 additions and 440 deletions
|
@ -3,6 +3,19 @@ from collections.abc import Generator
|
|||
|
||||
from pytest import MonkeyPatch, fixture
|
||||
|
||||
|
||||
def _clean_temp_dir():
|
||||
with contextlib.suppress(Exception):
|
||||
temp_dir = Path(__file__).parent / ".temp"
|
||||
|
||||
if temp_dir.exists():
|
||||
import shutil
|
||||
|
||||
shutil.rmtree(temp_dir, ignore_errors=True)
|
||||
|
||||
|
||||
_clean_temp_dir()
|
||||
|
||||
mp = MonkeyPatch()
|
||||
mp.setenv("PRODUCTION", "True")
|
||||
mp.setenv("TESTING", "True")
|
||||
|
@ -54,11 +67,6 @@ def test_image_png():
|
|||
@fixture(scope="session", autouse=True)
|
||||
def global_cleanup() -> Generator[None, None, None]:
|
||||
"""Purges the .temp directory used for testing"""
|
||||
|
||||
yield None
|
||||
with contextlib.suppress(Exception):
|
||||
temp_dir = Path(__file__).parent / ".temp"
|
||||
|
||||
if temp_dir.exists():
|
||||
import shutil
|
||||
|
||||
shutil.rmtree(temp_dir, ignore_errors=True)
|
||||
_clean_temp_dir()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue