| Conditions | 1 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """ |
||
| 13 | @pytest.fixture |
||
| 14 | def make_server(): |
||
| 15 | # Per default, bind to localhost on random user port. |
||
| 16 | def _wrapper(host='', port=0, *, api_tokens=None): |
||
| 17 | config = Config(host, port, api_tokens=api_tokens) |
||
| 18 | |||
| 19 | server = ReceiveServer(config) |
||
| 20 | |||
| 21 | thread = Thread(target=server.handle_request) |
||
| 22 | thread.start() |
||
| 23 | |||
| 24 | return server |
||
| 25 | |||
| 26 | return _wrapper |
||
| 27 | |||
| 32 |