Skip to content

Stop hardcoding a real-world system ID in test_services.py - #16

Merged
jakehadar merged 1 commit into
masterfrom
13-update-systems-csv-workflow
Jul 31, 2026
Merged

Stop hardcoding a real-world system ID in test_services.py#16
jakehadar merged 1 commit into
masterfrom
13-update-systems-csv-workflow

Conversation

@jakehadar

Copy link
Copy Markdown
Owner

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.py hardcoded '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

  • pytest passes (8/8) against the current bundled systems.csv

'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>
@jakehadar
jakehadar merged commit c02e52d into master Jul 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant