(self)
| 109 | self.db = self.client.pymongo_test |
| 110 | |
| 111 | def test_threading(self): |
| 112 | self.db.drop_collection("test") |
| 113 | self.db.test.insert_many([{"x": i} for i in range(1000)]) |
| 114 | |
| 115 | threads = [] |
| 116 | for _i in range(10): |
| 117 | t = SaveAndFind(self.db.test) |
| 118 | t.start() |
| 119 | threads.append(t) |
| 120 | |
| 121 | joinall(threads) |
| 122 | |
| 123 | def test_safe_insert(self): |
| 124 | self.db.drop_collection("test1") |
nothing calls this directly
no test coverage detected