NASA-IMPACT / COSMOS

COSMOS is a web application designed to manage collections indexed in NASA's Science Discovery Engine (SDE), facilitating precise content selection and allowing metadata modification before indexing.
https://sde-indexing-helper.nasa-impact.net/
3 stars 1 forks source link

API Tests for Token Verification, Request Accuracy, Response Parsing, and Error Handling #1088

Open saifrk opened 1 week ago

saifrk commented 1 week ago

Description

Create and run a set of tests for the Api class to ensure it handles authentication, endpoint requests, and response parsing correctly. This includes verifying that each endpoint (query or SQL) uses the correct type of credentials (username/password or token), and behaves appropriately when tokens are missing. The tests should also cover error handling for cases such as missing tokens and unsuccessful requests.

Implementation Considerations

-

Deliverable

An api_tests.py file that can be executed to validate token verification, request accuracy, response parsing, and basic error handling for the API.

Dependencies

No response