This repository was archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Improvement of vocabulary-tests needed? #8
Copy link
Copy link
Open
Description
The tests for vocabularies provided here:
iridium/tests/test_inveniordm_api.py
Lines 23 to 50 in 4d357dc
| def test_vocabularies(rdm): | |
| """Test queries to vocabularies.""" | |
| with pytest.raises(httpx.HTTPStatusError): | |
| rdm.query.vocabulary("invalid_voc") | |
| res = rdm.query.vocabulary(VocType.resource_types) | |
| assert res.hits.total == 33 | |
| lcs = rdm.query.vocabulary(VocType.licenses) | |
| assert lcs.hits.total == 418 | |
| sjs = rdm.query.vocabulary(VocType.subjects) | |
| assert sjs.hits.total == 48 | |
| lgs = rdm.query.vocabulary(VocType.languages) | |
| assert lgs.hits.total == 7847 | |
| assert rdm.query.vocabulary(VocType.languages, tags="extinct").hits.total == 619 | |
| lg = rdm.query.vocabulary(VocType.licenses, suggest="gli") | |
| assert lg.hits.total == 1 | |
| assert lg.hits.hits[0].id == "glide" | |
| with pytest.raises(httpx.HTTPStatusError): | |
| rdm.query.term("license", "invalid_license") | |
| gl = rdm.query.term(VocType.licenses, "glide") | |
| assert gl.id == "glide" |
are only working on instances where the vocabularies aren't adjusted. For example, a freshly installed instance.
It is expected and wanted behaviour that vocabularies are adapted and changed: https://inveniordm.docs.cern.ch/customize/vocabularies/
Our instance, for example, has already some other subjects and we are working on different record-types.
I wonder whether the current tests need more improvement or whether we want to limit these tests down to a 'untouched' vocabularies folder and we expect the user to disable or adjust these tests for their own instances.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels