MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / test_scram_threaded

Method test_scram_threaded

test/asynchronous/test_auth.py:656–671  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

654
655 @async_client_context.require_sync
656 async def test_scram_threaded(self):
657 coll = async_client_context.client.db.test
658 await coll.drop()
659 await coll.insert_one({"_id": 1})
660
661 # The first thread to call find() will authenticate
662 client = await self.async_rs_or_single_client()
663 coll = client.db.test
664 threads = []
665 for _ in range(4):
666 threads.append(AutoAuthenticateThread(coll))
667 for thread in threads:
668 thread.start()
669 for thread in threads:
670 thread.join()
671 self.assertTrue(thread.success)
672
673
674class TestAuthURIOptions(AsyncIntegrationTest):

Callers

nothing calls this directly

Calls 6

dropMethod · 0.45
insert_oneMethod · 0.45
startMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected