chore(api-client): restructure modules

This commit is contained in:
jo 2022-07-22 12:49:21 +02:00 committed by Kyle Robbertze
parent 71b3f7f065
commit 8369d55eb9
10 changed files with 102 additions and 99 deletions

View file

@ -0,0 +1,29 @@
from pathlib import Path
import pytest
from libretime_api_client.v2 import AirtimeApiClient
@pytest.fixture()
def config_filepath(tmp_path: Path):
filepath = tmp_path / "config.yml"
filepath.write_text(
"""
general:
public_url: http://localhost/test
api_key: TEST_KEY
"""
)
return filepath
def test_api_client(config_filepath):
client = AirtimeApiClient(config_path=config_filepath)
assert callable(client.services.version_url)
assert callable(client.services.schedule_url)
assert callable(client.services.webstream_url)
assert callable(client.services.show_instance_url)
assert callable(client.services.show_url)
assert callable(client.services.file_url)
assert callable(client.services.file_download_url)