File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
clickhouse/testcontainers/clickhouse Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,19 @@ class ClickHouseContainer(DbContainer):
3030
3131 .. doctest::
3232
33- >>> import clickhouse_driver
3433 >>> from testcontainers.clickhouse import ClickHouseContainer
3534
35+ >>> import clickhouse_driver
3636 >>> with ClickHouseContainer("clickhouse/clickhouse-server:21.8") as clickhouse:
3737 ... client = clickhouse_driver.Client.from_url(clickhouse.get_connection_url())
3838 ... client.execute("select 'working'")
3939 [('working',)]
40+
41+ >>> import clickhouse_connect
42+ >>> with ClickHouseContainer("clickhouse/clickhouse-server:21.8", port=8123) as clickhouse:
43+ ... client = clickhouse_connect.get_client(dsn=self.get_connection_url())
44+ ... client.command("select 'working'")
45+ [('working',)]
4046 """
4147
4248 CLICKHOUSE_USER = os .environ .get ("CLICKHOUSE_USER" , "test" )
You can’t perform that action at this time.
0 commit comments