Skip to content

Commit

Permalink
skip doctest for the cosmosdb module (the module binds static host po…
Browse files Browse the repository at this point in the history
…rts, and tests are run concurrently for several python versions)
  • Loading branch information
Mehdi BEN ABDALLAH committed May 27, 2024
1 parent 67f5220 commit a85a9b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions modules/cosmosdb/testcontainers/cosmosdb/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down
10 changes: 5 additions & 5 deletions modules/cosmosdb/testcontainers/cosmosdb/nosql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
"""

Expand Down

0 comments on commit a85a9b6

Please sign in to comment.