(self)
| 237 | |
| 238 | @contextmanager |
| 239 | def with_fake_rdb(self): |
| 240 | records = [] |
| 241 | |
| 242 | def fake_sink(): |
| 243 | return True |
| 244 | |
| 245 | class Fake_RPC: |
| 246 | |
| 247 | def __init__(self, sink): |
| 248 | pass |
| 249 | |
| 250 | def send(self, r): |
| 251 | records.append(r) |
| 252 | |
| 253 | with patch('testrunner.testproc.progress.rdb_sink', fake_sink), \ |
| 254 | patch('testrunner.testproc.resultdb.ResultDB_RPC', Fake_RPC): |
| 255 | yield records |
| 256 | |
| 257 | |
| 258 | class FakeOSContext(DefaultOSContext): |