1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-25 08:09:41 +02:00

chore: Remove Server Tasks (#3592)

This commit is contained in:
Michael Genson 2024-05-20 09:51:37 -05:00 committed by GitHub
parent 78d2a3b8aa
commit 61becdbec7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 12 additions and 341 deletions

View file

@ -1,21 +0,0 @@
from fastapi.testclient import TestClient
from mealie.services.server_tasks.background_executory import BackgroundExecutor
from tests.utils import api_routes
from tests.utils.fixture_schemas import TestUser
def test_admin_server_tasks_test_and_get(api_client: TestClient, admin_user: TestUser):
# Bootstrap Timer
BackgroundExecutor.sleep_time = 1
response = api_client.post(api_routes.admin_server_tasks, headers=admin_user.token)
assert response.status_code == 201
response = api_client.get(api_routes.admin_server_tasks, headers=admin_user.token)
as_dict = response.json()["items"]
assert len(as_dict) == 1
# Reset Timer
BackgroundExecutor.sleep_time = 60