(self)
| 121 | joinall(threads) |
| 122 | |
| 123 | def test_safe_insert(self): |
| 124 | self.db.drop_collection("test1") |
| 125 | self.db.test1.insert_one({"test": "insert"}) |
| 126 | self.db.drop_collection("test2") |
| 127 | self.db.test2.insert_one({"test": "insert"}) |
| 128 | |
| 129 | self.db.test2.create_index("test", unique=True) |
| 130 | self.db.test2.find_one() |
| 131 | |
| 132 | okay = Insert(self.db.test1, 2000, False) |
| 133 | error = Insert(self.db.test2, 2000, True) |
| 134 | |
| 135 | error.start() |
| 136 | okay.start() |
| 137 | |
| 138 | error.join() |
| 139 | okay.join() |
| 140 | |
| 141 | def test_safe_update(self): |
| 142 | self.db.drop_collection("test1") |
nothing calls this directly
no test coverage detected