| 279 | closed = [] |
| 280 | |
| 281 | class Iterable: |
| 282 | def __next__(self): |
| 283 | raise StopIteration() |
| 284 | |
| 285 | def __iter__(self): |
| 286 | return self |
| 287 | |
| 288 | def close(self): |
| 289 | closed.append(True) |
| 290 | |
| 291 | response = wrappers.Response(Iterable()) |
| 292 | response.call_on_close(lambda: closed.append(True)) |
no outgoing calls