aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-09-01 16:37:11 -0400
committerScott Murray <scott.murray@konsulko.com>2020-09-01 16:39:01 -0400
commit4cf3dafb9573ba18b1e06d9cbd0ed12d6348df91 (patch)
tree4f5ff34b407c30b0402a984942109108843f9aae
parente98f1c8e26c1173c6c2684e09e3a926fc92d08a0 (diff)
audiomixer and mediascanner bindings do not need to be started
The changes in AGL for SPECs 3557 and 3558 mean that the audiomixer and mediascanner bindings do not need to be started before running tests, disable doing so. Signed-off-by: Scott Murray <scott.murray@konsulko.com>
-rw-r--r--pyagl/services/audiomixer.py2
-rw-r--r--pyagl/services/base.py3
-rw-r--r--pyagl/services/mediascanner.py4
-rw-r--r--pyagl/tests/test_mediascanner.py2
4 files changed, 6 insertions, 5 deletions
diff --git a/pyagl/services/audiomixer.py b/pyagl/services/audiomixer.py
index 7d14cc8..6e447b7 100644
--- a/pyagl/services/audiomixer.py
+++ b/pyagl/services/audiomixer.py
@@ -31,7 +31,7 @@ class AudioMixerService(AGLBaseService):
parser.add_argument('--getvolume', help='Get volume level', action='store_true')
def __init__(self, ip, port=None, service='agl-service-audiomixer'):
- super().__init__(api='audiomixer', ip=ip, port=port, service=service, runservice=True)
+ super().__init__(api='audiomixer', ip=ip, port=port, service=service)
async def subscribe(self, event='volume_changed'): # audio mixer uses 'event' instead 'value',
return await self.request('subscribe', {'event': event})
diff --git a/pyagl/services/base.py b/pyagl/services/base.py
index 320abde..cd69f55 100644
--- a/pyagl/services/base.py
+++ b/pyagl/services/base.py
@@ -133,7 +133,8 @@ class AGLBaseService:
return parser
def __init__(self, api: str, ip: str, port: str = None, url: str = None,
- token: str = 'HELLO', uuid: str = 'magic', service: str = None, runservice: bool = False):
+ token: str = 'HELLO', uuid: str = 'magic', service: str = None,
+ runservice: bool = False, timeout: float = 5.0):
self.api = api
self.url = url
self.ip = ip
diff --git a/pyagl/services/mediascanner.py b/pyagl/services/mediascanner.py
index b40457f..3a6e876 100644
--- a/pyagl/services/mediascanner.py
+++ b/pyagl/services/mediascanner.py
@@ -25,8 +25,8 @@ class MediaScannerService(AGLBaseService):
parser = AGLBaseService.getparser()
parser.add_argument('--media_result', help='Query media_results verb', action='store_true')
- def __init__(self, ip, port=None, service='agl-service-mediascanner', runservice=True):
- super().__init__(api='mediascanner', ip=ip, port=port, service=service, runservice=runservice)
+ def __init__(self, ip, port=None, service='agl-service-mediascanner'):
+ super().__init__(api='mediascanner', ip=ip, port=port, service=service)
# more init stuff specific to the new service
async def media_result(self):
diff --git a/pyagl/tests/test_mediascanner.py b/pyagl/tests/test_mediascanner.py
index 9aba4b0..a4d57ee 100644
--- a/pyagl/tests/test_mediascanner.py
+++ b/pyagl/tests/test_mediascanner.py
@@ -33,7 +33,7 @@ def event_loop():
async def service():
address = os.environ.get('AGL_TGT_IP', 'localhost')
port = os.environ.get('AGL_TGT_PORT', None)
- ns = await mss(ip=address, port=port, runservice=True)
+ ns = await mss(ip=address, port=port)
yield ns
await ns.websocket.close()