mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-27 19:57:38 +00:00
first http domoticz test works
This commit is contained in:
+2
-3
@@ -90,9 +90,8 @@ def http_expect_request(path, matches, timeout=60):
|
||||
|
||||
# check http results
|
||||
while time.time()-start_time<timeout:
|
||||
while http_requests.full():
|
||||
request=http_requests.pop()
|
||||
|
||||
while not http_requests.empty():
|
||||
request=http_requests.get()
|
||||
if request.path == path:
|
||||
ok=True
|
||||
for match in matches.items():
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@ espeasy[0].device_p004(index=1, taskdevicepin1=2, plugin_004_dev=0, plugin_004_r
|
||||
espeasy[0].device_p004(index=2, taskdevicepin1=2, plugin_004_dev=1, plugin_004_res=9, TDID1=1418)
|
||||
|
||||
#wait for request
|
||||
temp1=http_expect_request("/json.html", { 'idx': 1417 }, timeout=10)
|
||||
temp2=http_expect_request("/json.html", { 'idx': 1418 }, timeout=10)
|
||||
temp1=http_expect_request("/json.htm", { 'idx': '1417' }, timeout=10)
|
||||
temp2=http_expect_request("/json.htm", { 'idx': '1418' }, timeout=10)
|
||||
|
||||
if not ( float(temp1.params['svalue'])>0 and float(temp1.params['svalue'])<40 and float(temp2.params['svalue'])>0 and float(temp2.params['svalue'])<40):
|
||||
raise(Exception("Wrong results"))
|
||||
|
||||
Reference in New Issue
Block a user