Skip to content
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

JSON endpoint returns 404 #60

Open
JWCook opened this issue Apr 12, 2021 · 2 comments
Open

JSON endpoint returns 404 #60

JWCook opened this issue Apr 12, 2021 · 2 comments

Comments

@JWCook
Copy link

JWCook commented Apr 12, 2021

It looks like /json currently returns a 404 with pytest-httpbin, while it returns a 200 with httpbin.org. All other response formats return a 200 with both pytest-httpbin and httpbin.org.

Minimal example:

import requests

def test_json(httpbin):
    assert requests.get('https://httpbin.org/json').status_code == 200
    assert requests.get(f'{httpbin.url}/json').status_code == 200
  • pytest-httpbin version: 1.0.0
  • python version: 3.8.5
@JWCook
Copy link
Author

JWCook commented Apr 12, 2021

I skimmed over the pytest-httpbin code and couldn't see anything obvious that would be responsible for the /json endpoint being any different than the others, so for all I know this could be a quirk in the httpbin package and not necessarily specific to pytest-httpbin. I figured it would be worth making an issue anyway, in case anyone else knows what's going on there.

@graingert
Copy link
Collaborator

@JWCook can you make a PR with a test for this in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants