fix style

This commit is contained in:
Yakov Olkhovskiy 2024-07-01 06:34:05 +00:00
parent 8673add990
commit 7c796113e8

View File

@ -19,6 +19,7 @@ instance = cluster.add_instance(
],
)
@pytest.fixture(scope="module", autouse=True)
def started_cluster():
try:
@ -28,6 +29,7 @@ def started_cluster():
finally:
cluster.shutdown()
config_default = """<clickhouse>
</clickhouse>"""
@ -71,23 +73,20 @@ def execute_query_native(node, query, config):
def test_default():
with pytest.raises(Exception) as err:
execute_query_native(
instance, "SELECT 1", config_default
)
execute_query_native(instance, "SELECT 1", config_default)
assert "certificate verify failed" in str(err.value)
def test_accept():
assert (
execute_query_native(
instance, "SELECT 1", config_accept
)
== "1\n"
)
assert execute_query_native(instance, "SELECT 1", config_accept) == "1\n"
def test_connection_accept():
assert (
execute_query_native(
instance, "SELECT 1", config_connection_accept.format(ip_address=f"{instance.ip_address}")
instance,
"SELECT 1",
config_connection_accept.format(ip_address=f"{instance.ip_address}"),
)
== "1\n"
)