-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add host parameter to aiohttp_server fixture. #10120
Labels
Comments
I think that's reasonable, feel free to make a PR. |
I created a PR: https://github.com/aio-libs/aiohttp/pull/10121/files |
Dreamsorcerer
pushed a commit
that referenced
this issue
Dec 9, 2024
Dreamsorcerer
pushed a commit
that referenced
this issue
Dec 9, 2024
Dreamsorcerer
added a commit
that referenced
this issue
Dec 9, 2024
Co-authored-by: ChristianWBrock <christian.brock AT posteo.net> (cherry picked from commit 7f8e2d3) Co-authored-by: christianwbrock <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem?
I develop code that accesses 3rd party services available as docker images.
When testing my code using the aiohttp pytest plugin the following needs to happen:
aiohttp_server
fixture.aiohttp_server
's URL as callback URL.172.17.0.1
.What happens is that aiohttp_server is unreachable.
This happens because:
aiohttp_server
callsTestServer(app, port=port)
-- inaiohttp/pytest_plugin.py
line 309TestServer.__init__()
has a default valuehost='127.0.0.1' in
aiohttp/test_utils.py` line 227Describe the solution you'd like
Change lines 306ff in
aiohttp.pytest_plugin.py
fromto
Describe alternatives you've considered
I created my own fixture, a copy of
aiohttp_server
with the fix applied.Related component
Server
Additional context
The releated component selected above is misleading, as only the pytest plugin is affected.
Code of Conduct
The text was updated successfully, but these errors were encountered: