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

fix: Test latest_dataset is not none when bounding_box is None #498

Merged
merged 3 commits into from
Jun 19, 2024

Conversation

jcpitre
Copy link
Contributor

@jcpitre jcpitre commented Jun 19, 2024

Summary:

Closes #440
Tested the conditions that lead to #431

Expected behavior:

These tests pass:

Testing tips:

To test I put back the code from PR #433 in api/src/feeds/impl/feeds_api_impl.py and verified that it failed.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@jcpitre jcpitre linked an issue Jun 19, 2024 that may be closed by this pull request
@@ -72,6 +72,9 @@ docker rm $container_name
# delete the data
rm -rf $SCRIPT_PATH/../data

# Add a slight delay because sometimes Docker does not seem ready after the rm.
sleep 5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳

@@ -125,20 +125,7 @@ def test_gtfs_feeds_get(client: TestClient, mocker):
subdivision_name="test_subdivision_name",
municipality="test_municipality",
)
mock_bounding_box = json.dumps(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion]: to have better coverage, I suggest creating a test for the missing bounding box, leaving this test as it covers the bounding box's presence and structure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually AFAIK the bounding box is not checked in this test.
I could add an assert for the bounding box in this test and create a new one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please

Copy link
Member

@davidgamez davidgamez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jcpitre jcpitre requested a review from davidgamez June 19, 2024 18:47
Copy link
Member

@davidgamez davidgamez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jcpitre jcpitre merged commit 4ccce7b into main Jun 19, 2024
2 checks passed
@jcpitre jcpitre deleted the 440-bounding-box-unit-test-issue-from-431 branch June 19, 2024 21:07
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

Successfully merging this pull request may close these issues.

Bounding box unit test issue from #431
2 participants