aboutsummaryrefslogtreecommitdiffstats
path: root/test_gps.py
diff options
context:
space:
mode:
authorEdi Feschiyan <edi.feschiyan@konsulko.com>2020-06-09 09:21:31 +0300
committerEdi Feschiyan <edi.feschiyan@konsulko.com>2020-06-09 09:30:31 +0300
commite2bb2d3ff3f909b9417040de4dd8ea876777a6ee (patch)
treee0ca7d0fd4e0e5d05f40f76cd7b3db0d04d23eac /test_gps.py
parent67f7da94a293ac332fab73db50a2467913d10ae9 (diff)
Adding argparser to bluetooth
Diffstat (limited to 'test_gps.py')
-rw-r--r--test_gps.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test_gps.py b/test_gps.py
index a3b59c7..e1ad15e 100644
--- a/test_gps.py
+++ b/test_gps.py
@@ -1,7 +1,7 @@
import asyncio
import os
import pytest
-from gps import GPSService
+from gps import GPSService as GPS
import logging
from aglbaseservice import AFBResponse, AFBT
@@ -18,7 +18,7 @@ def event_loop():
@pytest.fixture(scope='module')
async def service():
address = os.environ.get('AGL_TGT_IP', 'localhost')
- gpss = await GPSService(ip=address)
+ gpss = await GPS(ip=address)
yield gpss
await gpss.websocket.close()
@@ -28,24 +28,24 @@ async def service():
# yield _response
@pytest.mark.xfail # expecting this to fail because of "No 3D GNSS fix" and GPS is unavailable
-async def test_location(event_loop, service: GPSService):
+async def test_location(event_loop, service: GPS):
id = await service.location()
resp = AFBResponse(await service.response())
assert resp.status == 'success'
-async def test_subscribe_location(event_loop, service: GPSService):
+async def test_subscribe_location(event_loop, service: GPS):
id = await service.subscribe('location')
resp = AFBResponse(await service.response())
assert resp.msgid == id
assert resp.status == 'success'
-async def test_unsubscribe(event_loop, service: GPSService):
+async def test_unsubscribe(event_loop, service: GPS):
id = await service.unsubscribe('location')
resp = AFBResponse(await service.response())
assert resp.msgid == id
assert resp.status == 'success'
-async def test_location_events(event_loop, service: GPSService):
+async def test_location_events(event_loop, service: GPS):
id = await service.subscribe('location')
resp = AFBResponse(await service.response())
assert resp.msgid == id