Files
romm/backend/tests/models/test_assets.py
Michael Manganiello ba21cbc1e1 misc: Separate tests folder from backend code
Create separate `tests/` folder for all tests. This will also simplify
not copying tests code into the Docker image.
2025-08-08 12:49:13 -03:00

26 lines
812 B
Python

from models.assets import Save, Screenshot, State
def test_save(save: Save):
assert "test_platform_slug/saves/test_emulator/test_save.sav" in save.full_path
assert (
"/api/raw/assets/test_platform_slug/saves/test_emulator/test_save.sav"
in save.download_path
)
def test_state(state: State):
assert "test_platform_slug/states/test_emulator/test_state.state" in state.full_path
assert (
"/api/raw/assets/test_platform_slug/states/test_emulator/test_state.state"
in state.download_path
)
def test_screenshot(screenshot: Screenshot):
assert "test_platform_slug/screenshots/test_screenshot.png" in screenshot.full_path
assert (
"/api/raw/assets/test_platform_slug/screenshots/test_screenshot.png"
in screenshot.download_path
)