| import json | |
| from pathlib import Path | |
| from midnight_static.showcases import default_showcase, load_showcase, showcase_labels | |
| def test_default_showcase_asset_exists(): | |
| audio_path, script_json = default_showcase() | |
| assert audio_path is not None | |
| assert Path(audio_path).exists() | |
| assert Path(audio_path).stat().st_size > 100_000 | |
| assert json.loads(script_json)["title"].startswith("The Case of") | |
| def test_all_showcases_exist(): | |
| labels = showcase_labels() | |
| assert len(labels) == 3 | |
| for label in labels: | |
| audio_path, script_json = load_showcase(label) | |
| assert audio_path is not None | |
| assert Path(audio_path).exists() | |
| assert json.loads(script_json)["title"] == label | |