Skip to content

Commit 7aaad0b

Browse files
Add host parameter to aiohttp_server fixture (#63)
1 parent 0866b16 commit 7aaad0b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pytest_aiohttp/plugin.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,13 @@ async def aiohttp_server() -> Iterator[AiohttpServer]:
8282
servers = []
8383

8484
async def go(
85-
app: Application, *, port: Optional[int] = None, **kwargs: Any
85+
app: Application,
86+
*,
87+
host: str = "127.0.0.1",
88+
port: Optional[int] = None,
89+
**kwargs: Any,
8690
) -> TestServer:
87-
server = TestServer(app, port=port)
91+
server = TestServer(app, host=host, port=port)
8892
await server.start_server(**kwargs)
8993
servers.append(server)
9094
return server

0 commit comments

Comments
 (0)