fix: update test assertion to use settings.frontend_url #203
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api!203
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "202-fix-test-reg-link-copy-uses-base-url-to"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
test_reg_link_copy_uses_base_urlwhere the test still asserted againstsettings.base_urlafter PR #196 changed the implementation to usesettings.frontend_urlChanges
tests/test_tryouts.py: Updated assertion on line 419 fromsettings.base_urltosettings.frontend_urltests/test_tryouts.py: Updated docstring on line 407 to referencesettings.frontend_urlTest Plan
pytest tests/test_tryouts.py -x -qruff formatandruff checkcleanReview Checklist
Related Notes
forgejo_admin/basketball-api #196— PR that introduced the regressionQA Review
Diff: 1 file, +2/-2. Two-line fix in
tests/test_tryouts.py.Findings
settings.base_urlreplaced withsettings.frontend_urlon line 419. Matches the implementation change in PR #196 (tryouts.pyline 796). Correct.settings.frontend_url. Accurate.Closes #202present, commit message is descriptive.Nits
None.
VERDICT: APPROVE
PR #203 Review
DOMAIN REVIEW
Tech stack: Python / FastAPI / pytest
This is a 2-line test fix: updating
test_tryouts.pyto assert againstsettings.frontend_urlinstead ofsettings.base_url, aligning the test with the implementation change made in PR #196.Verification:
routes/tryouts.py:796usessettings.frontend_urlfor the registration link -- the test assertion now matches.config.py:29definesfrontend_urlas a settings field -- no import issues.settings.base_urlreference intest_tryouts.py:612(photo URLs) is correct as-is, sinceroutes/tryouts.py:509serves photos fromsettings.base_url(the API origin). This PR correctly scopes only the registration link assertion.The diff is minimal and correct. The docstring update on line 407 and the assertion update on line 419 are both accurate.
BLOCKERS
None.
NITS
test_reg_link_copy_uses_base_urlstill says "base_url" but the test now verifiesfrontend_url. Consider renaming totest_reg_link_copy_uses_frontend_urlfor clarity. Non-blocking since the docstring was updated and the name is still discoverable.SOP COMPLIANCE
202-fix-test-reg-link-copy-uses-base-url-tostarts with202)PROCESS OBSERVATIONS
Clean test regression fix. PR #196 changed behavior but missed updating the test assertion -- this is exactly the kind of thing a CI gate with
pytestin the pipeline would catch automatically. If the test was not running in CI at the time of PR #196, that is worth investigating as a process gap.VERDICT: APPROVED