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

Method test_scram_threaded

test/test_auth.py:652–667  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

650
651 @client_context.require_sync
652 def test_scram_threaded(self):
653 coll = client_context.client.db.test
654 coll.drop()
655 coll.insert_one({"_id": 1})
656
657 # The first thread to call find() will authenticate
658 client = self.rs_or_single_client()
659 coll = client.db.test
660 threads = []
661 for _ in range(4):
662 threads.append(AutoAuthenticateThread(coll))
663 for thread in threads:
664 thread.start()
665 for thread in threads:
666 thread.join()
667 self.assertTrue(thread.success)
668
669
670class TestAuthURIOptions(IntegrationTest):

Callers

nothing calls this directly

Calls 6

rs_or_single_clientMethod · 0.80
dropMethod · 0.45
insert_oneMethod · 0.45
startMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected