From d31287840273562ce74fc1d934e4f67d419c172a Mon Sep 17 00:00:00 2001 From: cpwu Date: Sat, 21 May 2022 17:24:07 +0800 Subject: [PATCH] fix case --- tests/system-test/0-others/user_control.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system-test/0-others/user_control.py b/tests/system-test/0-others/user_control.py index 25170c6a32..8843eba5a5 100644 --- a/tests/system-test/0-others/user_control.py +++ b/tests/system-test/0-others/user_control.py @@ -123,7 +123,7 @@ def taos_connect( class User: name : str = None passwd : str = None - db_set : list = [] + db_set : set = {} priv : str = None priv_weight : int = 0 @@ -142,7 +142,7 @@ class TDTestCase: self.root_user = User() self.root_user.name = "root" self.root_user.passwd = "passwd" - self.root_user.db_set = ["*"] + self.root_user.db_set = set("*") self.root_user.priv = PRIVILEGES_ALL self.root_user.priv_weight = WEIGHT_ALL for i in range(self.users_count): @@ -297,7 +297,7 @@ class TDTestCase: tdSql.error(sql) tdSql.query(sql) self.__change_user_priv(user=user, pre_priv=priv) - user.db_set = list(set(user.db_set.append(dbname))) + user.db_set.add(dbname) time.sleep(2) def revoke_user(self, user: User = None, priv=PRIVILEGES_ALL, dbname=None): -- GitLab