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):
13
13
14
14
Example:
15
15
16
- .. doctest::
16
+ .. code-block:: python
17
17
18
18
>>> from testcontainers.cosmosdb import CosmosDBMongoEndpointContainer
19
19
20
20
>>> 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
+
22
24
"""
23
25
24
26
def __init__ (
Original file line number Diff line number Diff line change @@ -17,20 +17,20 @@ class CosmosDBNoSQLEndpointContainer(CosmosDBEmulatorContainer):
17
17
18
18
Example:
19
19
20
- .. doctest::
20
+ .. code-block:: python
21
21
22
22
>>> from testcontainers.cosmosdb import CosmosDBNoSQLEndpointContainer
23
23
>>> 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")
25
25
26
- .. doctest::
26
+ .. code-block:: python
27
27
28
28
>>> from testcontainers.cosmosdb import CosmosDBNoSQLEndpointContainer
29
29
>>> from azure.cosmos import CosmosClient
30
30
31
31
>>> 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")
34
34
35
35
"""
36
36
You can’t perform that action at this time.
0 commit comments