test: add tests for Canvas Integration plugin#790
Open
arslanashraf7 wants to merge 1 commit into
Open
Conversation
5a52f91 to
d50315e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What are the relevant tickets?
https://github.com/mitodl/hq/issues/8200
This pull request introduces a comprehensive suite of new and improved tests for the
ol_openedx_canvas_integrationpackage. The changes focus on adding robust unit tests for the API, client, context API, handlers, and receivers modules. There are also some minor corrections and refactoring in test data structures and file organization. The overall goal is to ensure better coverage, reliability, and maintainability of the integration's core features.New and Improved Test Coverage:
apimodule, covering grade mapping, Canvas assignment creation/updating, and error handling for missing inputs.clientmodule, including Canvas session handling, pagination, enrollment lookups, caching, assignment CRUD operations, and payload formatting.context_apimodule, verifying resource loading and context section injection for Canvas integration.Test Data Structure and File Organization Improvements:
test_cms_tasks.pyto use the correct assignment dictionary structure (mapping to dicts withidkeys instead of plain ints) for consistency with production code. [1] [2]test_cms_tasks.pyandtest_settings.pyto the maintestsdirectory and updating path logic accordingly. [1] [2]These changes significantly improve the reliability of the integration by ensuring that core logic is well-tested and that test data structures match the expectations of the production code.
Description (What does it do?)
Screenshots (if appropriate):
How can this be tested?
Additional Context