Mercurial > code > home > repos > rdferry
comparison examples/empty_server_test.py @ 2:b4dc3eb1f92b
empty server & first test
author | drewp@bigasterisk.com |
---|---|
date | Sat, 16 Mar 2024 11:29:20 -0700 |
parents | |
children | 25538e3ee531 |
comparison
equal
deleted
inserted
replaced
1:db1ee14b922d | 2:b4dc3eb1f92b |
---|---|
1 from pathlib import Path | |
2 | |
3 import pytest | |
4 | |
5 from examples.run_server_make_request import HttpServer | |
6 | |
7 | |
8 @pytest.mark.asyncio | |
9 async def test_http_request_to_subprocess(): | |
10 async with HttpServer(Path('examples/empty_server.py')) as http_server: | |
11 response = await http_server.get('http://localhost:8005/') | |
12 assert response.status == 200 |