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-18 17:15:35 +0100
commit01131b1e4246a3fda44457365bda578be68263dc (patch)
tree280c20ed237076b0a636dcd818141c2a67e457c5
parent31737ecff7d5878822fc5eddb1921fc72e332ee9 (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)