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

Method setUp

test/test_gridfs_bucket.py:87–93  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

85 alt: gridfs.GridFSBucket
86
87 def setUp(self):
88 super().setUp()
89 self.fs = gridfs.GridFSBucket(self.db)
90 self.alt = gridfs.GridFSBucket(self.db, bucket_name="alt")
91 self.cleanup_colls(
92 self.db.fs.files, self.db.fs.chunks, self.db.alt.files, self.db.alt.chunks
93 )
94
95 def test_basic(self):
96 oid = self.fs.upload_from_stream("test_filename", b"hello world")

Callers 1

setUpMethod · 0.45

Calls 1

cleanup_collsMethod · 0.45

Tested by

no test coverage detected