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

JSONDecodeError in test_context_schema due to HTML response instead of JSON #139

Closed
zacdezgeo opened this issue Apr 4, 2024 · 1 comment

Comments

@zacdezgeo
Copy link

Description

I noticed @vincentsarago mentioned failing tests unrelated to his PR in #136.

While setting up a development environment for stac-pydantic and running tests using tox, I encountered failures in the main branch related to test_context_schema functions in test_context.py. These failures seem to be caused by the tests receiving an HTML page instead of the expected JSON schema from a remote URL, leading to JSONDecodeError.

Steps to Reproduce

  1. Clone the repository: git clone https://github.com/stac-utils/stac-pydantic.git
  2. Navigate to the project directory: cd stac-pydantic
  3. Install dependencies:
    • pip install pre-commit
    • pre-commit install
    • pip install tox
  4. Run tests: tox

Expected Behavior

I expected all tests to pass, particularly those fetching a JSON schema from a specified remote URL.

Actual Behavior

The test test_context_schema fails with a JSONDecodeError because they received an HTML response instead of the expected JSON content. This suggests that the URL might need to be corrected or updated.

Error Log

For full error details, refer to the tox log output concerning the test_context_schema function.

After gathering feedback, I'm open to suggestions and will look into submitting a PR to address this issue.

@vincentsarago
Copy link
Member

this was closed by removing the deprecated context extension in #138

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