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
Upgrade to Morango 0.6.6a0, with a test, and test refactoring #8449
Conversation
@@ -16,6 +16,9 @@ | |||
from morango.models.core import DatabaseIDModel |
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.
This file contains some utilities to support the syncing tests. I added a few helper methods on the server class to reduce boilerplate cruft in the test file.
|
||
# TODO: add back in after single-user exam assignment is reinstated | ||
# from kolibri.core.logger.models import ExamAttemptLog | ||
# from kolibri.core.logger.models import ExamLog |
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.
Because they won't pass until we reinstate single-user quiz syncing, I commented out the related test portions here (with a "TODO" by each, cited in the commented-out plugin file).
@@ -132,14 +134,24 @@ class EcosystemTestCase(TestCase): | |||
|
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.
Most of the rest of this file (except where otherwise noted) is just cleanup and refactors of the existing tests, to use the helper methods and some less verbose idioms.
.filter(exam_id=assignment_t.exam_id, user_id=self.learner.id) | ||
.exists() | ||
) | ||
# TODO: uncomment the following once single-user exam assignment syncing is reinstated |
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.
The section above is commented out because we don't support quizzes yet.
def test_facility_user_conflict_syncing_from_laptop(self, servers): | ||
self._test_facility_user_conflict(servers, False) | ||
|
||
def _test_facility_user_conflict(self, servers, tablet_is_client): |
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.
This one has just been moved down to this new class (rather than being stuck in the clutter of the assignment testing class).
) | ||
|
||
@multiple_kolibri_servers(3) | ||
def test_kolibri_issue_8439(self, servers): |
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.
This is the actual new test that was introduced here. It's short but effective at catching the issue.
# Conflicts: # requirements/base.txt
...and we have the correct sync of the learner past progress reflected on a new setup of the learn-only device! 🎉 I repeated the test case from #8439 (twice, just to be sure), and I can see correctly all the past progress on the 2 lessons when I erase the app from the tablet and install from scratch. Great job!!! 👍🏽
|
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.
Looking good, merge away! 💯
Summary
In order to fix #8439, this PR bumps Kolibri to use the (yet unreleased) Morango 0.6.6 that has been pushed to learningequality/morango#134. It also adds a test for #8439, and some considerable (but quite superficial) refactoring that simplifies and cleans up the ecosystem tests overall.
References
Fixes #8439.
Relies on the release of learningequality/morango#134.
Reviewer guidance
Testing prior to the release of Morango 0.6.6 would require:
jamalex/fsics-fix
) in Kolibri.frikn_fsic_fix
branch in Morango.pip install -e <path to morango source tree>
.INTEGRATION_TEST=true pytest kolibri/core/auth/test/test_morango_integration.py
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)