diff options
author | Hector Fernandez <hector@iatec.biz> | 2020-04-13 09:49:51 +0200 |
---|---|---|
committer | Hector Fernandez <hector@iatec.biz> | 2020-04-13 10:06:37 +0200 |
commit | f86887baef80509460da0bff8f48b2900a627282 (patch) | |
tree | 70276382e2bba14673f763e2dbcace998a8fe685 /test-cli/test/helpers/testsrv_db.py | |
parent | 0c610ebbef5928f17ec8c14d872b4d4298d3c4fb (diff) | |
download | board-f86887baef80509460da0bff8f48b2900a627282.zip board-f86887baef80509460da0bff8f48b2900a627282.tar.gz board-f86887baef80509460da0bff8f48b2900a627282.tar.bz2 |
Added new DB functions. Added Qrreader.py file.
Diffstat (limited to 'test-cli/test/helpers/testsrv_db.py')
-rw-r--r-- | test-cli/test/helpers/testsrv_db.py | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/test-cli/test/helpers/testsrv_db.py b/test-cli/test/helpers/testsrv_db.py index d563e74..dc4fb55 100644 --- a/test-cli/test/helpers/testsrv_db.py +++ b/test-cli/test/helpers/testsrv_db.py @@ -139,12 +139,12 @@ class TestSrv_Database(object): def create_task_result(self, taskid_ctl, name, newstatus, newinfo=None): sql = "SELECT isee.f_create_task_result({},'{}','{}','{}')".format(taskid_ctl, name, newstatus, newinfo) - print('>>>' + sql) + # print('>>>' + sql) try: self.__sqlObject.db_execute_query(sql) except Exception as err: r = find_between(str(err), '#', '#') - print(r) + # print(r) return None def update_taskctl_status(self, taskid_ctl, newstatus): @@ -156,3 +156,24 @@ class TestSrv_Database(object): r = find_between(str(err), '#', '#') # print(r) return None + + def set_factorycode(self, uuid, factorycode): + sql = "SELECT isee.f_set_factorycode('{}','{}')".format(uuid, factorycode) + # print('>>>' + sql) + try: + self.__sqlObject.db_execute_query(sql) + except Exception as err: + 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) + # print('>>>' + sql) + try: + self.__sqlObject.db_execute_query(sql) + except Exception as err: + r = find_between(str(err), '#', '#') + # print(r) + return None + |