From 0d8caf8dd9281a8237ccd6b71628bfe2e3df9ebf Mon Sep 17 00:00:00 2001 From: zhipz Date: Tue, 16 Jul 2024 09:11:24 +0800 Subject: [PATCH] Changing the database default values to the python None --- tests/pytest/util/common.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/pytest/util/common.py b/tests/pytest/util/common.py index 38d8502572..ef69c065f0 100644 --- a/tests/pytest/util/common.py +++ b/tests/pytest/util/common.py @@ -537,21 +537,21 @@ class TDCom: tdLog.info("cfgPath: %s" % cfgPath) return cfgPath - def newcon(self,host='localhost',port=6030,user='root',password='taosdata', database='None'): + def newcon(self,host='localhost',port=6030,user='root',password='taosdata', database=None): con=taos.connect(host=host, user=user, password=password, port=port, database=database) # print(con) return con - def newcur(self,host='localhost',port=6030,user='root',password='taosdata',databse='None'): + def newcur(self,host='localhost',port=6030,user='root',password='taosdata',database=None): cfgPath = self.getClientCfgPath() - con=taos.connect(host=host, user=user, password=password, config=cfgPath, port=port,database='None') + con=taos.connect(host=host, user=user, password=password, config=cfgPath, port=port,database=database) cur=con.cursor() # print(cur) return cur - def newTdSql(self, host='localhost',port=6030,user='root',password='taosdata'): + def newTdSql(self, host='localhost',port=6030,user='root',password='taosdata', database = None): newTdSql = TDSql() - cur = self.newcur(host=host,port=port,user=user,password=password) + cur = self.newcur(host=host,port=port,user=user,password=password, database=database) newTdSql.init(cur, False) return newTdSql