-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Summary
Build a comprehensive test suite for the Python reconciler that covers all endpoints and specifically handles ROR API v2 merge/redirect behavior. The current Ruby implementation has limited test coverage. The Python port should include tests that validate reconciliation logic against realistic ROR API responses.
Tests
GET /heartbeat
- Returns 200 with JSON containing status, version, PID, Python version
- Validates response schema
GET /reconcile (service metadata)
- Returns correct W3C Reconciliation API service manifest
- Includes service name, identifierSpace, schemaSpace, default types, preview and suggest metadata
POST /reconcile (reconciliation queries)
- Single query returns up to 5 scored results with ROR IDs, names, and types
- Batch queries (multiple
q0,q1, ... keys) return independent result sets - Empty/whitespace query returns empty results
- Special characters in query names (; & / ?) are handled correctly
- Query matching an exact organization name returns that org with a high score and
match: true - Query with no matches returns an empty result list
GET /suggest
- Returns suggestions matching a prefix
- Empty prefix returns empty results
- Results include id, name, and description fields
GET /flyout
- Returns HTML snippet and ROR ID for a valid organization
- Invalid ROR ID returns appropriate error/empty response
GET /preview/*
- Returns rendered HTML preview for a valid ROR ID
- Handles both bare ROR IDs and full
https://ror.org/...URLs - Invalid ROR ID returns appropriate error
GET /
- Redirects to https://www.ror.org
Integration tests
- End-to-end test with a running app instance that runs through the full request lifecycle from HTTP request through ROR API call (mocked) to response rendering
- Verify CORS headers are present on responses
Acceptance criteria
- Test suite covers all 7 endpoint routes
- Tests run in CI (GitHub Actions) and block deployment on failure
- Tests execute without network access (all external HTTP calls mocked)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Backlog