(self)
| 236 | self.assertEqual(100 * [b"hello"], results) |
| 237 | |
| 238 | def test_threaded_writes(self): |
| 239 | threads = [] |
| 240 | for i in range(10): |
| 241 | threads.append(JustWrite(self.fs, 10)) |
| 242 | threads[i].start() |
| 243 | |
| 244 | joinall(threads) |
| 245 | |
| 246 | fstr = self.fs.open_download_stream_by_name("test") |
| 247 | self.assertEqual(fstr.read(), b"hello") |
| 248 | |
| 249 | # Should have created 100 versions of 'test' file |
| 250 | self.assertEqual(100, self.db.fs.files.count_documents({"filename": "test"})) |
| 251 | |
| 252 | def test_get_last_version(self): |
| 253 | one = self.fs.upload_from_stream("test", b"foo") |
nothing calls this directly
no test coverage detected