test: move live API probe out of unit discovery - #4
Open
djbclark wants to merge 1 commit into
Open
Conversation
6 tasks
djbclark
marked this pull request as ready for review
July 31, 2026 13:23
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why this is useful
Backend test discovery should be safe to run in a fresh checkout and in CI. The existing
backend/tests/test_api.pyperforms a credentialed request to a live/recentendpoint as soon as the file is imported, so discovering the test suite can fail before any real test runs unless a local server and runtime token happen to be available.This change keeps test discovery deterministic and offline while preserving the live-server check as an explicit diagnostic command. Contributors can run the test suite without hidden runtime prerequisites, and operators still have a clearer probe with a configurable server URL, bounded timeout, and meaningful exit status.
Summary
/recentAPI probe frombackend/tests/tobackend/scripts/check_api.py.Verification
python3 -m compileall -q backend/scripts/check_api.pypython3 backend/scripts/check_api.py --helpPYTHONPATH=backend <project-python> backend/tests/test_access_token.py— all five existing API authentication checks passed.main, with only the two expected files changed.Roadmap FYI
The broader plan for small SuperBrain contributions that do not depend on YouTube approving enhanced YouTube Data API access, including increased quota, is tracked in djbclark/superbrain#3. These contributions may support YouTube-related workflows, but OAuth subscription discovery, YouTube playlist management and backfill, and other approval-dependent API work are explicitly excluded from this PR and held back.