from importlib import resources from pathlib import Path from arbitrade.api import routes def test_template_directory_resolves_to_existing_location() -> None: template_dir = Path(routes._resolve_templates_directory()) assert template_dir.is_dir() assert (template_dir / "dashboard.html").is_file() def test_template_exists_in_package_resources() -> None: template_path = resources.files("arbitrade").joinpath( "web", "templates", "dashboard.html" ) assert template_path.is_file()