mealie/tests/unit_tests/test_nextcloud.py
Hayden 42deb5ad10
Feature/migration-rewrite (#278)
* start

* migration rewrite

* update name

* convert chowdown to new methods

* refactor/remove duplicate code

* refactor to unify logger + log to file

* remove toolbox

* Display report on UI

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-04-10 15:09:06 -08:00

40 lines
1.1 KiB
Python

# import shutil
# from pathlib import Path
# import pytest
# from mealie.core.config import app_dirs
# from mealie.schema.recipe import Recipe
# from tests.test_config import TEST_NEXTCLOUD_DIR
# CWD = Path(__file__).parent
# TEST_NEXTCLOUD_DIR
# TEMP_NEXTCLOUD = app_dirs.TEMP_DIR.joinpath("nextcloud")
# @pytest.mark.parametrize(
# "file_name,final_path",
# [("nextcloud.zip", TEMP_NEXTCLOUD)],
# )
# def test_zip_extraction(file_name: str, final_path: Path):
# prep()
# zip = TEST_NEXTCLOUD_DIR.joinpath(file_name)
# dir = process_selection(zip)
# assert dir == final_path
# cleanup()
# assert dir.exists() is False
# @pytest.mark.parametrize(
# "recipe_dir",
# [
# TEST_NEXTCLOUD_DIR.joinpath("Air Fryer Shrimp"),
# TEST_NEXTCLOUD_DIR.joinpath("Chicken Parmigiana"),
# TEST_NEXTCLOUD_DIR.joinpath("Skillet Shepherd's Pie"),
# ],
# )
# def test_nextcloud_migration(recipe_dir: Path):
# recipe = import_recipes(recipe_dir)
# assert isinstance(recipe, Recipe)
# shutil.rmtree(app_dirs.IMG_DIR.joinpath(recipe.image), ignore_errors=True)