Unit tests (as in, tests for unit folders) #5646
Open
+141
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a test to make sure that units have their assessment items published as a Perseus zip (not QTI, as for now that only happens for Surveys) but skips assessment metadata
Updates publishing logic with helper function
has_assessmentsto handle the two cases consistently in all places we check.Fixes issue that arose when adding more test data to the export channel test setup - previously the Bad Mastery exercise node did not appear in the complete nodes for some reason, but now it does. Explicitly skips it.
Updates le-utils for updated JSONSchema for mastery criteria.
Note: This relies on ricecooker code pushing the correct assessment_item_ids at time of push, rather than dynamically generating them.
References
In support of learningequality/kolibri-ecosystem#38
Reviewer guidance
Are there any places where exercise handling has been updated that it shouldn't? Are there any places where exercise handling hasn't been updated but it should?
I have tested this locally, uploading an example course channel to my development server and ensuring the published channel db look as I would expect, with the correct options data on the UNITs, and appropriate file objects in the DB.
Attached here: a0271e8992f856a99a2d1b8ecfde9c5a.zip