-
Notifications
You must be signed in to change notification settings - Fork 9
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
test: add TestPathRedirectionMiddleware integration tests AP-1547
#298
base: master
Are you sure you want to change the base?
Conversation
14220fc
to
10dd64f
Compare
86c3ec7
to
5816b47
Compare
1564138
to
7724856
Compare
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.
I'm not sure if this PR is ready for review, cause I think an issue was still being addressed. Please, let me know to go through it again :)
class TestPathRedirectionMiddleware(BaseIntegrationTest): | ||
"""Integration tests for the PathRedirectionMiddleware.""" | ||
|
||
def setUp(self): |
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.
Are we considering the process_mktg_redirect
test case somewhere?
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.
Yes, I added new tests: ab56e37
…t to tests/integration/utils.py
cf996d8
to
80ed570
Compare
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.
I left a few non-blocking comments for you to address. Other than that, it looks good to me!
return response.json()["access_token"] | ||
|
||
|
||
ACCESS_TOKEN = get_access_token() |
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.
Out of curiosity, why is this here instead of being in L59? Do other files use it separately?
Base class for the integration test suite. | ||
""" | ||
|
||
def __init__(self, *args, **kwargs): |
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.
Out of curiosity, again. Why are we using __init__
instead of the standard setup
for test case classes?
""" | ||
domain = f"{prefix}.{settings['LMS_BASE']}" if prefix else settings["LMS_BASE"] | ||
return { | ||
"base_url": f"http://{domain}", |
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.
Is this always going to be http, right?
Description
This PR adds integration tests for the
TestPathRedirectionMiddleware
middleware. These tests are executed in the job of Tutor Integration TestsTesting instructions
Check the jobs of Tutor Integration Tests in the PR.
Jira Issue