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

Method setUp

test/performance/perf_test.py:540–551  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

538
539class GridFsTest(PerformanceTest):
540 def setUp(self):
541 super().setUp()
542 self.client = client_context.client
543 self.client.drop_database("perftest")
544
545 gridfs_path = os.path.join(
546 TEST_PATH, os.path.join("single_and_multi_document", "gridfs_large.bin")
547 )
548 with open(gridfs_path, "rb") as data:
549 self.document = data.read()
550 self.data_size = len(self.document)
551 self.bucket = GridFSBucket(self.client.perftest)
552
553 def tearDown(self):
554 super().tearDown()

Callers

nothing calls this directly

Calls 5

GridFSBucketClass · 0.90
setUpMethod · 0.45
drop_databaseMethod · 0.45
joinMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected