Skip to content

Commit fcc6cce

Browse files
committed
fixed linting clickhouse container and fixed doctest
1 parent 04e999c commit fcc6cce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clickhouse/testcontainers/clickhouse/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ class ClickHouseContainer(DbContainer):
4141
[('working',)]
4242
4343
>>> import clickhouse_connect
44-
>>> with ClickHouseContainer("clickhouse/clickhouse-server:21.8", port=8123) as clickhouse:
45-
... client = clickhouse_connect.get_client(dsn=self.get_connection_url())
44+
>>> with ClickHouseContainer("clickhouse/clickhouse-server:21.8",
45+
... port=8123) as clickhouse:
46+
... client = clickhouse_connect.get_client(dsn=clickhouse.get_connection_url())
4647
... client.command("select 'working'")
47-
[('working',)]
48+
'working'
4849
"""
4950

5051
CLICKHOUSE_USER = os.environ.get("CLICKHOUSE_USER", "test")
@@ -76,7 +77,6 @@ def _connect(self) -> None:
7677
with clickhouse_driver.Client.from_url(self.get_connection_url()) as client:
7778
client.execute("SELECT version()")
7879

79-
8080
def _configure(self) -> None:
8181
self.with_env("CLICKHOUSE_USER", self.CLICKHOUSE_USER)
8282
self.with_env("CLICKHOUSE_PASSWORD", self.CLICKHOUSE_PASSWORD)

0 commit comments

Comments
 (0)