mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
try to fix black
This commit is contained in:
parent
ec0d426a6f
commit
f69a19d01d
@ -390,10 +390,19 @@ def test_introspection():
|
||||
instance.query("GRANT CREATE ON *.* TO B WITH GRANT OPTION")
|
||||
|
||||
assert instance.query("SHOW USERS") == TSV(["A", "B", "default"])
|
||||
assert instance.query("SHOW CREATE USERS A") == TSV(["CREATE USER A IDENTIFIED WITH no_password"])
|
||||
assert instance.query("SHOW CREATE USERS B") == TSV(["CREATE USER B IDENTIFIED WITH no_password"])
|
||||
assert (
|
||||
instance.query("SHOW CREATE USERS A")
|
||||
== TSV(["CREATE USER A IDENTIFIED WITH no_password"])
|
||||
)
|
||||
assert (
|
||||
instance.query("SHOW CREATE USERS B")
|
||||
== TSV(["CREATE USER B IDENTIFIED WITH no_password"])
|
||||
)
|
||||
assert instance.query("SHOW CREATE USERS A,B") == TSV(
|
||||
["CREATE USER A IDENTIFIED WITH no_password", "CREATE USER B IDENTIFIED WITH no_password"]
|
||||
[
|
||||
"CREATE USER A IDENTIFIED WITH no_password",
|
||||
"CREATE USER B IDENTIFIED WITH no_password"
|
||||
]
|
||||
)
|
||||
assert instance.query("SHOW CREATE USERS") == TSV(
|
||||
[
|
||||
|
@ -152,7 +152,10 @@ def test_smoke():
|
||||
]
|
||||
|
||||
instance.query("ALTER USER robin SETTINGS NONE")
|
||||
assert instance.query("SHOW CREATE USER robin") == "CREATE USER robin IDENTIFIED WITH no_password\n"
|
||||
assert (
|
||||
instance.query("SHOW CREATE USER robin")
|
||||
== "CREATE USER robin IDENTIFIED WITH no_password\n"
|
||||
)
|
||||
assert (
|
||||
instance.query(
|
||||
"SELECT value FROM system.settings WHERE name = 'max_memory_usage'",
|
||||
|
@ -22,7 +22,10 @@ def test_basic(started_cluster):
|
||||
# 1. Without VALID UNTIL
|
||||
node.query("CREATE USER user_basic")
|
||||
|
||||
assert node.query("SHOW CREATE USER user_basic") == "CREATE USER user_basic IDENTIFIED WITH no_password\n"
|
||||
assert (
|
||||
node.query("SHOW CREATE USER user_basic")
|
||||
== "CREATE USER user_basic IDENTIFIED WITH no_password\n"
|
||||
)
|
||||
assert node.query("SELECT 1", user="user_basic") == "1\n"
|
||||
|
||||
# 2. With valid VALID UNTIL
|
||||
@ -48,7 +51,10 @@ def test_basic(started_cluster):
|
||||
# 4. Reset VALID UNTIL
|
||||
node.query("ALTER USER user_basic VALID UNTIL 'infinity'")
|
||||
|
||||
assert node.query("SHOW CREATE USER user_basic") == "CREATE USER user_basic IDENTIFIED WITH no_password\n"
|
||||
assert (
|
||||
node.query("SHOW CREATE USER user_basic")
|
||||
== "CREATE USER user_basic IDENTIFIED WITH no_password\n"
|
||||
)
|
||||
assert node.query("SELECT 1", user="user_basic") == "1\n"
|
||||
node.query("DROP USER user_basic")
|
||||
|
||||
@ -76,7 +82,9 @@ def test_details(started_cluster):
|
||||
)
|
||||
|
||||
# 2. Time only is not supported
|
||||
node.query("CREATE USER user_details_time_only IDENTIFIED WITH no_password VALID UNTIL '22:03:40'")
|
||||
node.query(
|
||||
"CREATE USER user_details_time_only IDENTIFIED WITH no_password VALID UNTIL '22:03:40'"
|
||||
)
|
||||
|
||||
until_year = datetime.today().strftime("%Y")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user