Skip to content

Commit

Permalink
Add host parameter to aiohttp_server fixture (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamsorcerer authored Dec 9, 2024
1 parent 0866b16 commit 7aaad0b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pytest_aiohttp/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,13 @@ async def aiohttp_server() -> Iterator[AiohttpServer]:
servers = []

async def go(
app: Application, *, port: Optional[int] = None, **kwargs: Any
app: Application,
*,
host: str = "127.0.0.1",
port: Optional[int] = None,
**kwargs: Any,
) -> TestServer:
server = TestServer(app, port=port)
server = TestServer(app, host=host, port=port)
await server.start_server(**kwargs)
servers.append(server)
return server
Expand Down

0 comments on commit 7aaad0b

Please sign in to comment.