chore(api-client): restructure modules
This commit is contained in:
parent
71b3f7f065
commit
8369d55eb9
10 changed files with 102 additions and 99 deletions
29
api-client/tests/v2_test.py
Normal file
29
api-client/tests/v2_test.py
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue