(self)
| 419 | self.assertEqual("iso-8859-1", (self.fs.get(oid)).encoding) |
| 420 | |
| 421 | def test_missing_length_iter(self): |
| 422 | # Test fix that guards against PHP-237 |
| 423 | self.fs.put(b"", filename="empty") |
| 424 | doc = self.db.fs.files.find_one({"filename": "empty"}) |
| 425 | assert doc is not None |
| 426 | doc.pop("length") |
| 427 | self.db.fs.files.replace_one({"_id": doc["_id"]}, doc) |
| 428 | f = self.fs.get_last_version(filename="empty") |
| 429 | |
| 430 | def iterate_file(grid_file): |
| 431 | for _chunk in grid_file: |
| 432 | pass |
| 433 | return True |
| 434 | |
| 435 | self.assertTrue(iterate_file(f)) |
| 436 | |
| 437 | def test_gridfs_lazy_connect(self): |
| 438 | client = self.single_client("badhost", connect=False, serverSelectionTimeoutMS=10) |
nothing calls this directly
no test coverage detected