44from testcontainers .core .waiting_utils import wait_container_is_ready
55
66from ._emulator import CosmosDBEmulatorContainer
7- __all__ = ["NoSQLEmulatorContainer " ]
7+ __all__ = ["CosmosDBNoSQLEndpointContainer " ]
88
99NOSQL_PORT = 8081
1010
11- class NoSQLEmulatorContainer (CosmosDBEmulatorContainer ):
11+ class CosmosDBNoSQLEndpointContainer (CosmosDBEmulatorContainer ):
1212 """
1313 CosmosDB NoSQL enpoint Emulator.
1414
1515 Example:
16+
1617 .. doctest::
17- >>> from testcontainers.cosmosdb import NoSQLEmulatorContainer
18- >>> with NoSQLEmulatorContainer() as emulator:
19- ... db = emulator.insecure_sync_client().create_database_if_not_exists("test")
18+
19+ >>> from testcontainers.cosmosdb import CosmosDBNoSQLEndpointContainer
20+ >>> with CosmosDBNoSQLEndpointContainer() as emulator:
21+ ... db = emulator.insecure_sync_client().create_database_if_not_exists("test")
2022
2123 .. doctest::
22- >>> from testcontainers.cosmosdb import NoSQLEmulatorContainer
23- >>> with NoSQLEmulatorContainer() as emulator:
24- ... client = CosmosClient(url=emulator.url, credential=emulator.key, connection_verify=False)
25- ... db = client.create_database_if_not_exists("test")
24+
25+ >>> from testcontainers.cosmosdb import CosmosDBNoSQLEndpointContainer
26+ >>> from azure.cosmos import CosmosClient
27+
28+ >>> with CosmosDBNoSQLEndpointContainer() as emulator:
29+ ... client = CosmosClient(url=emulator.url, credential=emulator.key, connection_verify=False)
30+ ... db = client.create_database_if_not_exists("test")
2631
2732 """
2833
@@ -43,13 +48,13 @@ def url(self) -> str:
4348 """
4449 return f"https://{ self .host } :{ self .port } "
4550
46- def insecure_async_client (self ) -> AsyncCosmosClient :
51+ def insecure_async_client (self ):
4752 """
4853 Returns an asynchronous CosmosClient instance
4954 """
5055 return AsyncCosmosClient (url = self .url , credential = self .key , connection_verify = False )
5156
52- def insecure_sync_client (self ) -> SyncCosmosClient :
57+ def insecure_sync_client (self ):
5358 """
5459 Returns a synchronous CosmosClient instance
5560 """
0 commit comments