File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
modules/cosmosdb/testcontainers/cosmosdb Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,14 @@ class CosmosDBMongoEndpointContainer(CosmosDBEmulatorContainer):
1313
1414 Example:
1515
16- .. doctest::
16+ .. code-block:: python
1717
1818 >>> from testcontainers.cosmosdb import CosmosDBMongoEndpointContainer
1919
2020 >>> with CosmosDBMongoEndpointContainer(mongodb_version="4.0") as emulator:
21- ... print(f"Point your MongoDB client at {emulator.host}:{emulator.port}}")
21+ ... print(f"Point your MongoDB client at {emulator.host}:{emulator.port} using key {emulator.key}")
22+ ... print(f"and eiher disable TLS server auth or trust the server's self signed cert (emulator.server_certificate_pem)")
23+
2224 """
2325
2426 def __init__ (
Original file line number Diff line number Diff line change @@ -17,20 +17,20 @@ class CosmosDBNoSQLEndpointContainer(CosmosDBEmulatorContainer):
1717
1818 Example:
1919
20- .. doctest::
20+ .. code-block:: python
2121
2222 >>> from testcontainers.cosmosdb import CosmosDBNoSQLEndpointContainer
2323 >>> with CosmosDBNoSQLEndpointContainer() as emulator:
24- ... db = emulator.insecure_sync_client().create_database_if_not_exists("test")
24+ ... db = emulator.insecure_sync_client().create_database_if_not_exists("test")
2525
26- .. doctest::
26+ .. code-block:: python
2727
2828 >>> from testcontainers.cosmosdb import CosmosDBNoSQLEndpointContainer
2929 >>> from azure.cosmos import CosmosClient
3030
3131 >>> with CosmosDBNoSQLEndpointContainer() as emulator:
32- ... client = CosmosClient(url=emulator.url, credential=emulator.key, connection_verify=False)
33- ... db = client.create_database_if_not_exists("test")
32+ ... client = CosmosClient(url=emulator.url, credential=emulator.key, connection_verify=False)
33+ ... db = client.create_database_if_not_exists("test")
3434
3535 """
3636
You can’t perform that action at this time.
0 commit comments