diff --git a/modules/cosmosdb/testcontainers/cosmosdb/mongodb.py b/modules/cosmosdb/testcontainers/cosmosdb/mongodb.py index b4a44932d..82e8c096b 100644 --- a/modules/cosmosdb/testcontainers/cosmosdb/mongodb.py +++ b/modules/cosmosdb/testcontainers/cosmosdb/mongodb.py @@ -13,12 +13,14 @@ class CosmosDBMongoEndpointContainer(CosmosDBEmulatorContainer): Example: - .. doctest:: + .. code-block:: python >>> from testcontainers.cosmosdb import CosmosDBMongoEndpointContainer >>> with CosmosDBMongoEndpointContainer(mongodb_version="4.0") as emulator: - ... print(f"Point your MongoDB client at {emulator.host}:{emulator.port}}") + ... print(f"Point your MongoDB client at {emulator.host}:{emulator.port} using key {emulator.key}") + ... print(f"and eiher disable TLS server auth or trust the server's self signed cert (emulator.server_certificate_pem)") + """ def __init__( diff --git a/modules/cosmosdb/testcontainers/cosmosdb/nosql.py b/modules/cosmosdb/testcontainers/cosmosdb/nosql.py index d9f2776fe..f78469674 100644 --- a/modules/cosmosdb/testcontainers/cosmosdb/nosql.py +++ b/modules/cosmosdb/testcontainers/cosmosdb/nosql.py @@ -17,20 +17,20 @@ class CosmosDBNoSQLEndpointContainer(CosmosDBEmulatorContainer): Example: - .. doctest:: + .. code-block:: python >>> from testcontainers.cosmosdb import CosmosDBNoSQLEndpointContainer >>> with CosmosDBNoSQLEndpointContainer() as emulator: - ... db = emulator.insecure_sync_client().create_database_if_not_exists("test") + ... db = emulator.insecure_sync_client().create_database_if_not_exists("test") - .. doctest:: + .. code-block:: python >>> from testcontainers.cosmosdb import CosmosDBNoSQLEndpointContainer >>> from azure.cosmos import CosmosClient >>> with CosmosDBNoSQLEndpointContainer() as emulator: - ... client = CosmosClient(url=emulator.url, credential=emulator.key, connection_verify=False) - ... db = client.create_database_if_not_exists("test") + ... client = CosmosClient(url=emulator.url, credential=emulator.key, connection_verify=False) + ... db = client.create_database_if_not_exists("test") """