Commit 2b105ef
committed
broaden /metadata/:class tests; narrow 404 test to bogus-only names
- Extend `test_metadata_route_renders_for_model_class` to loop over
`Ontology`, `Metrics`, `Class` — covers plain top-level lookup
(`Ontology`), singularization (`Metrics` → `Metric`), and a second
plain case with a distinctive name (`Class`). All three hit the same
`resolve_model_class` top-level branch, but `Ontology` was the one
case we previously had no explicit coverage for.
- Rename `test_metadata_route_returns_404_for_non_class_names` →
`test_metadata_route_returns_404_for_bogus_names` and trim its list
to `DefinitelyNotAModel`, `nonexistent_thing`, `xyzqux123` —
guaranteed-nonexistent identifiers that will stay 404 regardless of
future features.
The previous list (`created`, `body`, `prefixIRI`, `name`,
`omvacronym`) was misleading: those *are* attribute URIs the API
emits in JSON-LD @context, currently 404'd as a stop-gap but tracked
in ncbo/bioportal-project#388 for actual attribute-documentation
rendering. Leaving them asserted as 404 would turn into a false
regression signal when #388 lands.1 parent d2e5b64 commit 2b105ef
1 file changed
Lines changed: 19 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
50 | 61 | | |
51 | 62 | | |
52 | 63 | | |
| |||
0 commit comments