| 9 | |
| 10 | |
| 11 | class DummyResponse: |
| 12 | def __init__(self, status_code=200, payload=None, text="", headers=None, on_return=None): |
| 13 | self.status_code = status_code |
| 14 | self._payload = payload |
| 15 | self.text = text |
| 16 | self.headers = headers or {} |
| 17 | self.on_return = on_return |
| 18 | |
| 19 | def json(self): |
| 20 | if self._payload is None: |
| 21 | raise ValueError("no json payload") |
| 22 | return self._payload |
| 23 | |
| 24 | |
| 25 | class QueueSession: |
no outgoing calls