summaryrefslogtreecommitdiff
path: root/test/test_sound_node_client.py
blob: 16feb78fa0d936352f2ba458e9c17c4df3cc130e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python3
import sys, os.path
sys.path.extend([
    os.path.realpath(os.path.join(os.path.dirname(os.path.join(__file__)), '..')),
])

from src.home.api.errors import ApiResponseError
from src.home.media import SoundNodeClient


if __name__ == '__main__':
    client = SoundNodeClient(('127.0.0.1', 8313))
    print(client.amixer_get_all())

    try:
        client.amixer_get('invalidname')
    except ApiResponseError as exc:
        print(exc)