diff options
Diffstat (limited to 'test/test_sound_node_client.py')
-rwxr-xr-x | test/test_sound_node_client.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test_sound_node_client.py b/test/test_sound_node_client.py new file mode 100755 index 0000000..16feb78 --- /dev/null +++ b/test/test_sound_node_client.py @@ -0,0 +1,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) + |