1
0
personal-data/test/test_psnprofiles.py
Jon Michael Aanes 96a2e2bed9
Some checks failed
Run Python tests (through Pytest) / Test (push) Failing after 40s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 28s
Code quality and typing improvements
2024-10-25 22:09:27 +02:00

16 lines
560 B
Python

import pytest
from personal_data.fetchers import psnprofiles
URLS_AND_IDS = [
(21045, '/trophies/21045-theatrhythm-final-bar-line'),
(21045, '/trophies/21045-theatrhythm-final-bar-line/'),
(21045, '/trophies/21045-theatrhythm-final-bar-line/HelloWorld'),
(21045, '/trophy/21045-theatrhythm-final-bar-line/19-seasoned-hunter'),
]
@pytest.mark.parametrize(('psnprofiles_id', 'url'), URLS_AND_IDS)
def test_game_psnprofiles_id_from_url(psnprofiles_id: int, url: str):
assert psnprofiles.game_psnprofiles_id_from_url(url) == psnprofiles_id