You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: add local dummy Databus HTTP server for offline download tests - #120
Adds a lightweight, stdlib-only local dummy Databus HTTP server fixture (dummy_databus_server) in tests/test_download_offline_server.py to support offline end-to-end download testing without hitting databus.dbpedia.org.
Simulates Databus collection (GET), SPARQL (POST /sparql), JSON-LD metadata, and file (HEAD/GET) endpoints locally on 127.0.0.1.
Adds test_download_collection_offline and test_download_sparql_query_offline without modifying existing conftest.py stubs.
Related Issues
Addresses the "Advanced" offline testing section of Issue #20.
Type of change
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to change)
No actionable comments were generated in the recent review.
Walkthrough
The change adds offline tests for collection-URL and SPARQL-query downloads. The tests use a local threaded HTTP server and verify the downloaded file name, count, and payload.
Changes: Offline download tests
Layer / File(s)
Summary
Local server and download assertions tests/test_download_offline_server.py
A fixture starts a local HTTP server, patches the downloader’s SPARQL wrapper, and ensures server cleanup. Tests verify that collection-URL and SPARQL-query downloads each write one sample.ttl file with the expected payload.
This change adds offline tests for collection and SPARQL downloads using a local server. It does not alter production behavior, and no merge-blocking risk was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: a local dummy Databus HTTP server added for offline download tests. The changeset adds the dummy_databus_server fixture in tests/test_download_offline_server.py and tw…
Description check
The description follows the repository template. It has a clear Description that explains the stdlib-only dummy Databus HTTP server fixture and the endpoints it simulates. It links Issue #20 under Rel…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a local dummy Databus HTTP server added for offline download tests. The changeset adds the dummy_databus_server fixture in tests/test_download_offline_server.py and two offline download tests, so the title matches the primary change. It uses the conventional 'test:' prefix and is concise.
Full details: Description check
Explanation
The description follows the repository template. It has a clear Description that explains the stdlib-only dummy Databus HTTP server fixture and the endpoints it simulates. It links Issue #20 under Related Issues and marks Housekeeping under Type of change. The checklist is filled in, and the documentation item is left unchecked, which is acceptable because the change adds tests only.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 61ba85e3-9c08-4d41-be89-f3daeac5a5b1
Commits
Reviewing files that changed from the base of the PR and between b35bd2c and 681512a.
Files selected for processing: 1
tests/test_download_offline_server.py
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Adds a lightweight, stdlib-only local dummy Databus HTTP server fixture (
dummy_databus_server) intests/test_download_offline_server.pyto support offline end-to-end download testing without hittingdatabus.dbpedia.org.GET), SPARQL (POST /sparql), JSON-LD metadata, and file (HEAD/GET) endpoints locally on127.0.0.1.test_download_collection_offlineandtest_download_sparql_query_offlinewithout modifying existingconftest.pystubs.Related Issues
Addresses the "Advanced" offline testing section of Issue #20.
Type of change
Checklist:
poetry run pytest- all tests passedpoetry run ruff check- no linting errorsSummary by CodeRabbit