16 lines
560 B
Python
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
|