summaryrefslogtreecommitdiff
path: root/test-cli/test/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'test-cli/test/helpers')
-rw-r--r--test-cli/test/helpers/testsrv_db.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/test-cli/test/helpers/testsrv_db.py b/test-cli/test/helpers/testsrv_db.py
index dfb4d15..637d45c 100644
--- a/test-cli/test/helpers/testsrv_db.py
+++ b/test-cli/test/helpers/testsrv_db.py
@@ -202,9 +202,21 @@ class TestSrv_Database(object):
r = find_between(str(err), '#', '#')
# print(r)
return None
-
- def bond_to_station(self, uuid, station):
- sql = "SELECT station.bond_to_station('{}','{}')".format(uuid, station)
+
+ def read_station_state(self, station):
+ sql = "SELECT * FROM station.getmystate('{}');".format(station)
+ # print('>>>' + sql)
+ try:
+ res = self.__sqlObject.db_execute_query(sql)
+ # print(res)
+ return res[0][0]
+ except Exception as err:
+ r = find_between(str(err), '#', '#')
+ # print(r)
+ return None
+
+ def change_station_state(self, station, newstate):
+ sql = "SELECT station.setmystate('{}', '{}', NULL)".format(newstate, station)
# print('>>>' + sql)
try:
self.__sqlObject.db_execute_query(sql)