fix test cleanup

This commit is contained in:
hay-kot 2021-04-06 12:02:45 -08:00
commit 56133f85fa
2 changed files with 3 additions and 2 deletions

View file

@ -29,7 +29,7 @@ def test_non_default_settings(monkeypatch):
monkeypatch.setenv("DEFAULT_GROUP", "Test Group") monkeypatch.setenv("DEFAULT_GROUP", "Test Group")
monkeypatch.setenv("DEFAULT_PASSWORD", "Test Password") monkeypatch.setenv("DEFAULT_PASSWORD", "Test Password")
monkeypatch.setenv("API_PORT", "8000") monkeypatch.setenv("API_PORT", "8000")
monkeypatch.setenv("API_DOCS", False) monkeypatch.setenv("API_DOCS", 'False')
app_settings = AppSettings() app_settings = AppSettings()

View file

@ -1,3 +1,4 @@
import shutil
from pathlib import Path from pathlib import Path
import pytest import pytest
@ -36,4 +37,4 @@ def test_zip_extraction(file_name: str, final_path: Path):
def test_nextcloud_migration(recipe_dir: Path): def test_nextcloud_migration(recipe_dir: Path):
recipe = import_recipes(recipe_dir) recipe = import_recipes(recipe_dir)
assert isinstance(recipe, Recipe) assert isinstance(recipe, Recipe)
app_dirs.IMG_DIR.joinpath(recipe.image).unlink(missing_ok=True) shutil.rmtree(app_dirs.IMG_DIR.joinpath(recipe.image), ignore_errors=True)