Commit 5260a8f
committed
Fix CI and reject Mapping inputs to _format_api_dates
Two issues:
1. CI failure on `test_get_args_basic` / `test_get_args_with_exclude`.
The pre-existing tests used `monitoring_location_id="123"` purely as a
placeholder to exercise `_get_args`'s filter/exclude logic. After the
previous commit centralized the AGENCY-ID format check into `_get_args`,
the bare "123" now raises ValueError before the dict-shaping assertions
are reached. Update the placeholder to a well-formed "USGS-123" so the
test's actual intent — filter + exclude wiring — still runs.
2. Copilot review: `_format_api_dates` silently accepts a Mapping by
materializing its keys (`time={"2024-01-01": "x"}` → `["2024-01-01"]`),
the same footgun `_normalize_str_iterable` already rejects elsewhere.
Raise TypeError before the `list(...)` call. Adds a unit test.1 parent 702ea29 commit 5260a8f
2 files changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
244 | 250 | | |
245 | 251 | | |
246 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
227 | 237 | | |
228 | 238 | | |
229 | 239 | | |
| |||
0 commit comments