-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: Implement IDV URL Filters #213
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -20,6 +20,7 @@ | |||||
CourseRunAPIRenderStarted, | ||||||
CourseUnenrollmentStarted, | ||||||
DashboardRenderStarted, | ||||||
IDVPageURLRequested, | ||||||
InstructorDashboardRenderStarted, | ||||||
ORASubmissionViewRenderStarted, | ||||||
RenderXBlockStarted, | ||||||
|
@@ -728,3 +729,26 @@ def test_course_run_api_render_started(self): | |||||
result = CourseRunAPIRenderStarted.run_filter(serialized_courserun) | ||||||
|
||||||
self.assertEqual(serialized_courserun, result) | ||||||
|
||||||
|
||||||
class TestIDVFilters(TestCase): | ||||||
""" | ||||||
Test class to verify standard behavior of the ID verification filters. | ||||||
You'll find test suites for: | ||||||
|
||||||
- IDVPageURLRequested | ||||||
""" | ||||||
|
||||||
def test_course_idv_page_url_requested(self): | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: is there a reason that the test case includes course in it? Wondering if it should be:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, this is another artifact from me copy/pasting tests. |
||||||
""" | ||||||
Test IDVPageURLRequested filter behavior under normal conditions. | ||||||
|
||||||
Expected behavior: | ||||||
- The filter must have the signature specified. | ||||||
- The filter should return the url. | ||||||
""" | ||||||
url = Mock(), Mock() | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm curious why you need a tuple here. url should be a single value. Does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forgot to remove this when I copy/pasted an earlier test |
||||||
|
||||||
result = IDVPageURLRequested.run_filter(url) | ||||||
|
||||||
self.assertEqual(url, result) |
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.
Could you add type annotations to the method definition, since that seems to be the pattern in this repository, please?