1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-03 04:25:24 +02:00

chore: remove unused jinja export option (#5631)

This commit is contained in:
Hayden 2025-07-04 19:45:56 -05:00 committed by GitHub
parent 50a986f331
commit da3271f33f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 8 additions and 137 deletions

View file

@ -18,28 +18,9 @@ def test_get_available_exports(api_client: TestClient, unique_user: TestUser) ->
as_json = response.json()
assert "recipes.md" in as_json["jinja2"]
assert "raw" in as_json["json"]
def test_render_jinja_template(api_client: TestClient, unique_user: TestUser) -> None:
# Create Recipe
recipe_name = random_string()
response = api_client.post(api_routes.recipes, json={"name": recipe_name}, headers=unique_user.token)
assert response.status_code == 201
slug = response.json()
# Render Template
response = api_client.get(
api_routes.recipes_slug_exports(slug) + "?template_name=recipes.md", headers=unique_user.token
)
assert response.status_code == 200
# Assert Template is Rendered Correctly
# TODO: More robust test
assert f"# {recipe_name}" in response.text
def test_get_recipe_as_zip(api_client: TestClient, unique_user: TestUser) -> None:
# Create Recipe
recipe_name = random_string()
@ -61,13 +42,3 @@ def test_get_recipe_as_zip(api_client: TestClient, unique_user: TestUser) -> Non
with zipfile.ZipFile(zip_file, "r") as zip_fp:
with zip_fp.open(f"{slug}.json") as json_fp:
assert json.loads(json_fp.read())["name"] == recipe_name
# TODO: Allow users to upload templates to their own directory
# def test_upload_template(api_client: TestClient, unique_user: TestUser) -> None:
# assert False
# # TODO: Allow users to upload templates to their own directory
# def test_delete_template(api_client: TestClient, unique_user: TestUser) -> None:
# assert False