Untested case for the best classes option on elements lists
I noticed my merge request !1027 (merged) (related to metadata) was causing a coverage drop in arkindex.documents.tests.test_classes
. This seems to be caused by the test_validated_non_best_class
: it updates non-high-confidence and classifications on an element to be validated, then accesses it via ListElementParents
and checks for the best classes. However, there is no test for the existence of said parent in the API response. In this case, the lack of this parent caused two lines of test to not run.
Coverage report: https://codecov.io/gl/arkindex/backend/pull/1027/changes
Unit test: https://gitlab.com/arkindex/backend/-/blob/33ca41479c1c84eae3a90893dcd3e23653a6fb4a/arkindex/documents/tests/test_classes.py#L327