Stop hardcoding a real-world system ID in test_services.py - #16
Merged
Conversation
'ABU' (ADCB Bikeshare) was asserted as a known-good system ID, but that kind of magic string goes stale whenever upstream systems.csv changes - same class of bug as #8. Assert against whatever the first row's system ID actually is instead, so the test stays valid regardless of upstream churn (including the automated refreshes from #14). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
PR #14 (the scheduled systems.csv update workflow) merged before this follow-up commit was pushed to the same branch, so it never made it into
master. Re-opening as its own PR.test_services.pyhardcoded'ABU'(ADCB Bikeshare) as a known-good system ID. That's fragile: it's a real-world ID living in mutable upstream data, and the whole point of the new scheduled workflow (#14) is that this data will now change regularly. Replaced the hardcoded ID with an assertion against whatever the first row's system ID actually is, so the test can't go stale on future refreshes.Test plan
pytestpasses (8/8) against the current bundledsystems.csv