(requests)
| 868 | call_count = {"n": 0} |
| 869 | |
| 870 | def _submit_batch(requests): |
| 871 | with lock: |
| 872 | call_count["n"] += 1 |
| 873 | n = call_count["n"] |
| 874 | if n == 2: |
| 875 | raise ConnectionError("lost connection") |
| 876 | return "job-1" |
| 877 | |
| 878 | bp.submit_batch.side_effect = _submit_batch |
| 879 | bp.poll_batch.return_value = MagicMock() |
nothing calls this directly
no outgoing calls
no test coverage detected