aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-11-10 15:54:33 -0500
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-11-11 12:35:14 +0000
commit5aed9a32ea71737709a11590d6ecc92f773f85d6 (patch)
tree9688f6f4f7a9659ec294a261edb425f2b436ec8f
parentc18df018bae551a0e42d8348cb87b6e24203ca80 (diff)
Add marks for Internet requiring tests
Add "internet" mark to geoclue and weather binding tests to allow skipping them with the pytest keyword option. Bug-AGL: SPEC-3685 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I330666ff57f044f04f42d1e89d0768e1a61406ae
-rw-r--r--pyagl/pytest.ini2
-rw-r--r--pyagl/tests/test_geoclue.py3
-rw-r--r--pyagl/tests/test_weather.py2
3 files changed, 7 insertions, 0 deletions
diff --git a/pyagl/pytest.ini b/pyagl/pytest.ini
index 57522c2..53a16df 100644
--- a/pyagl/pytest.ini
+++ b/pyagl/pytest.ini
@@ -3,6 +3,7 @@ norecursedirs = templates
markers =
hwrequired: verb tests requiring available physical hardware
+ internet: verb tests requiring Internet access
audiomixer: agl-service-audiomixer tests
bluetooth: agl-service-bluetooth tests
bluetooth_map: agl-service-bluetooth-map tests
@@ -18,3 +19,4 @@ markers =
radio: agl-service-radio tests
signal_composer: agl-service-signal-composer tests
weather: agl-service-weather tests
+ hvac: agl-service-hvac tests
diff --git a/pyagl/tests/test_geoclue.py b/pyagl/tests/test_geoclue.py
index 1853ec8..47266a2 100644
--- a/pyagl/tests/test_geoclue.py
+++ b/pyagl/tests/test_geoclue.py
@@ -38,6 +38,8 @@ async def service():
yield svc
await svc.websocket.close()
+
+@pytest.mark.internet
async def test_location(event_loop, service: gcs):
msgid = await service.location()
resp = await service.afbresponse()
@@ -49,6 +51,7 @@ async def test_location(event_loop, service: gcs):
assert resp.status == 'success', resp.info
+@pytest.mark.internet
async def test_subscribe(event_loop, service: gcs):
msgid = await service.subscribe()
resp = await service.afbresponse()
diff --git a/pyagl/tests/test_weather.py b/pyagl/tests/test_weather.py
index 3643bf5..95d85e9 100644
--- a/pyagl/tests/test_weather.py
+++ b/pyagl/tests/test_weather.py
@@ -45,6 +45,7 @@ async def test_apikey(event_loop, service: ws):
assert resp.msgid == msgid
assert resp.data['api_key'] == 'a860fa437924aec3d0360cc749e25f0e'
+@pytest.mark.internet
async def test_current_weather(event_loop, service: ws):
msgid = await service.current_weather()
resp = await service.afbresponse()
@@ -65,6 +66,7 @@ async def test_bad_unsubscription(event_loop, service: ws):
@pytest.mark.dependency
+@pytest.mark.internet
async def test_subscribe_weather(event_loop, service: ws):
event = 'weather'
msgid = await service.subscribe(event)