| 216 | |
| 217 | |
| 218 | class MockConnection: |
| 219 | def __init__(self): |
| 220 | self.cancel_context = _CancellationContext() |
| 221 | self.more_to_come = False |
| 222 | self.id = random.randint(0, 100) |
| 223 | self.is_sdam = False |
| 224 | self.server_connection_id = random.randint(0, 100) |
| 225 | |
| 226 | def close_conn(self, reason): |
| 227 | pass |
| 228 | |
| 229 | def __enter__(self): |
| 230 | return self |
| 231 | |
| 232 | def __exit__(self, exc_type, exc_val, exc_tb): |
| 233 | pass |
| 234 | |
| 235 | |
| 236 | class MockPool: |