MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / test_multi_chunk_file

Method test_multi_chunk_file

test/test_grid_file.py:400–411  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

398 self.assertTrue(g.closed)
399
400 def test_multi_chunk_file(self):
401 random_string = b"a" * (DEFAULT_CHUNK_SIZE + 1000)
402
403 f = GridIn(self.db.fs)
404 f.write(random_string)
405 f.close()
406
407 self.assertEqual(1, self.db.fs.files.count_documents({}))
408 self.assertEqual(2, self.db.fs.chunks.count_documents({}))
409
410 g = GridOut(self.db.fs, f._id)
411 self.assertEqual(random_string, g.read())
412
413 def test_small_chunks(self):
414 self.files = 0

Callers

nothing calls this directly

Calls 6

writeMethod · 0.95
closeMethod · 0.95
readMethod · 0.95
GridInClass · 0.90
GridOutClass · 0.90
count_documentsMethod · 0.45

Tested by

no test coverage detected