1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 15:49:42 +02:00

feat: mealplan-webhooks (#1403)

* fix type errors on event bus

* webhooks fields required for new implementation

* db migration

* wip: webhook query + tests and stub function

* ignore type checker error

* type and method cleanup

* datetime and time utc validator

* update testing code for utc scheduled time

* fix file cmp function call

* update version_number

* add support for translating "time" objects when restoring backup

* bump recipe-scrapers

* use specific import syntax

* generate frontend types

* utilize names exports

* use utc times

* add task to scheduler

* implement new scheduler functionality

* stub for type annotation

* implement meal-plan data getter

* add experimental banner
This commit is contained in:
Hayden 2022-06-17 13:25:47 -08:00 committed by GitHub
parent b1256f4ad2
commit 5a053cdcd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 428 additions and 93 deletions

View file

@ -1,10 +1,11 @@
import contextlib
from collections.abc import Generator
from pytest import MonkeyPatch, fixture
mp = MonkeyPatch()
mp.setenv("PRODUCTION", "True")
mp.setenv("TESTING", "True")
from pathlib import Path
from fastapi.testclient import TestClient
@ -34,11 +35,9 @@ def api_client():
yield TestClient(app)
try:
with contextlib.suppress(Exception):
settings = config.get_app_settings()
settings.DB_PROVIDER.db_path.unlink() # Handle SQLite Provider
except Exception:
pass
@fixture(scope="session")
@ -52,16 +51,13 @@ def test_image_png():
@fixture(scope="session", autouse=True)
def global_cleanup() -> None:
def global_cleanup() -> Generator[None, None, None]:
"""Purges the .temp directory used for testing"""
yield None
try:
with contextlib.suppress(Exception):
temp_dir = Path(__file__).parent / ".temp"
if temp_dir.exists():
import shutil
shutil.rmtree(temp_dir, ignore_errors=True)
except Exception:
pass