-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drop all references to CODE_MANAGER_URL (#22872)
- Loading branch information
Showing
20 changed files
with
8 additions
and
414 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,17 +141,6 @@ def test_to_is_excluded_when_unsafe(self): | |
query = parse_qs(url.query) | ||
assert ':' not in query['state'][0] | ||
|
||
def test_allows_code_manager_url(self): | ||
self.initialize_session({}) | ||
code_manager_url = 'https://code.example.org' | ||
to = f'{code_manager_url}/foobar' | ||
with override_settings(CODE_MANAGER_URL=code_manager_url): | ||
response = self.client.get(f'{self.url}?to={to}') | ||
url = urlparse(response['location']) | ||
query = parse_qs(url.query) | ||
state_parts = query['state'][0].split(':') | ||
assert base64.urlsafe_b64decode(state_parts[1] + '====') == to.encode() | ||
|
||
def test_allows_absolute_urls(self): | ||
self.initialize_session({}) | ||
domain = 'example.org' | ||
|
@@ -1162,34 +1151,6 @@ def test_log_in_redirects_to_absolute_url(self): | |
) | ||
self.assertRedirects(response, next_path, fetch_redirect_response=False) | ||
|
||
def test_log_in_redirects_to_code_manager(self): | ||
email = '[email protected]' | ||
UserProfile.objects.create(email=email) | ||
self.fxa_identify.return_value = ( | ||
{'email': email, 'uid': '9001'}, | ||
self.token_data, | ||
) | ||
code_manager_url = 'https://example.org' | ||
next_path = f'{code_manager_url}/path' | ||
with override_settings(CODE_MANAGER_URL=code_manager_url): | ||
response = self.client.get( | ||
self.url, | ||
{ | ||
'code': 'code', | ||
'state': ':'.join( | ||
[ | ||
self.fxa_state, | ||
force_str(base64.urlsafe_b64encode(next_path.encode())), | ||
] | ||
), | ||
}, | ||
) | ||
self.assertRedirects(response, next_path, fetch_redirect_response=False) | ||
assert ( | ||
response['Cache-Control'] | ||
== 'max-age=0, no-cache, no-store, must-revalidate, private' | ||
) | ||
|
||
def test_log_in_requires_https_when_request_is_secure(self): | ||
email = '[email protected]' | ||
UserProfile.objects.create(email=email) | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,6 @@ | |
from olympia.files.models import File, FileUpload, FileValidation | ||
from olympia.files.tests.test_models import UploadMixin | ||
from olympia.files.utils import check_xpi_info, parse_addon | ||
from olympia.reviewers.templatetags.code_manager import code_manager_url | ||
from olympia.users.models import UserProfile | ||
|
||
|
||
|
@@ -351,21 +350,6 @@ def test_linkify_validation_messages(self): | |
assert link.text == 'https://bugzilla.mozilla.org/' | ||
assert link.attrib['href'] == 'https://bugzilla.mozilla.org/' | ||
|
||
def test_file_url(self): | ||
response = self.client.get(self.url, follow=False) | ||
doc = pq(response.content) | ||
assert doc('#addon-validator-suite').attr['data-file-url'] is None | ||
|
||
def test_file_url_reviewer(self): | ||
self.client.logout() | ||
self.client.force_login(UserProfile.objects.get(email='[email protected]')) | ||
file_url = code_manager_url( | ||
'browse', addon_id=self.addon.pk, version_id=self.file.version.pk | ||
) | ||
response = self.client.get(self.url, follow=False) | ||
doc = pq(response.content) | ||
assert doc('#addon-validator-suite').attr['data-file-url'] == file_url | ||
|
||
def test_reviewers_can_see_json_results_for_deleted_addon(self): | ||
self.client.logout() | ||
self.client.force_login(UserProfile.objects.get(email='[email protected]')) | ||
|
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.