summaryrefslogtreecommitdiff
path: root/src/test/test_sound_node_client.py
blob: 795165a18cb8008b12fa7801b614e0444e0afec2 (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.sound 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)