try to fix black

This commit is contained in:
Arthur Passos 2024-06-27 09:20:12 -03:00
parent ec0d426a6f
commit f69a19d01d
3 changed files with 27 additions and 7 deletions

View File

@ -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(
[

View File

@ -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'",

View File

@ -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")