-
Notifications
You must be signed in to change notification settings - Fork 716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add regression testing for channel update deletion behaviour #11896
Add regression testing for channel update deletion behaviour #11896
Conversation
Build Artifacts
|
@rtibbles
E sqlalchemy.exc.ArgumentError: SQL expression for WHERE/HAVING role expected, got . ../../../.pyenv/versions/3.9.9/envs/kolibriNew/lib/python3.9/site-packages/sqlalchemy/util/compat.py:211: ArgumentError |
My first suggestion here would be to use the It may be necessary to subclass the ContentImportBase class for this, to do additional setup and mocking: https://github.com/learningequality/kolibri/pull/11896/files#diff-192861a164181b5a5a8f25abf4bfa8502039d501ad331a5b24b7b149cb0d6f41R381 |
Thanks for the review! I also have a confusion that in this elif condition https://github.com/learningequality/kolibri/blob/develop/kolibri/core/content/utils/channel_import.py#L744 shouldn't we return a False? |
No - in that elif condition we are deleting the currently imported channel metadata, so we need to return True. If we returned False, we would delete the existing metadata, and then not import the updated metadata. |
Okay thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me, thank you!
Merging with the broken docs build, as this doesn't appear to be caused by this PR. |
Summary
Add test cases as mentioned in #5960 (comment)
Also handle the case when
current_version
orcurrent_partial
is None, preventing the TypeError from occurring.…
References
Fixes #5960
…
Reviewer guidance
I am not sure about my
test_full_import_with_newer_version
which apparently is failing…
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)