Created
June 4, 2020 15:33
-
-
Save bobsilverberg/28554a607e668f5d004bacd6c2b46971 to your computer and use it in GitHub Desktop.
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
diff --git a/src/olympia/devhub/tests/test_views_validation.py b/src/olympia/devhub/tests/test_views_validation.py | |
index 355456f3b5..93ee20ad0f 100644 | |
--- a/src/olympia/devhub/tests/test_views_validation.py | |
+++ b/src/olympia/devhub/tests/test_views_validation.py | |
@@ -276,6 +276,13 @@ class TestFileValidation(TestCase): | |
assert link.text == 'https://bugzilla.mozilla.org/' | |
assert link.attrib['href'] == 'https://bugzilla.mozilla.org/' | |
+ def test_can_see_json_results_for_deleted_addon(self): | |
+ self.client.logout() | |
+ assert self.client.login(email='[email protected]') | |
+ print('----- self.json_url: ', self.json_url) | |
+ self.addon.delete() | |
+ assert self.client.head(self.json_url, follow=False).status_code == 200 | |
+ | |
class TestValidateAddon(TestCase): | |
fixtures = ['base/users'] | |
diff --git a/src/olympia/devhub/views.py b/src/olympia/devhub/views.py | |
index 997817d00d..ca8d86ae55 100644 | |
--- a/src/olympia/devhub/views.py | |
+++ b/src/olympia/devhub/views.py | |
@@ -677,7 +677,12 @@ def file_validation(request, addon_id, addon, file_id): | |
@csrf_exempt | |
@dev_required(allow_reviewers_for_read=True) | |
def json_file_validation(request, addon_id, addon, file_id): | |
+ import ipdb | |
+ ipdb.set_trace() | |
+ print('----- in json_file_validation...') | |
+ | |
file = get_object_or_404(File, version__addon=addon, id=file_id) | |
+ print('----- in json_file_validation, file: ', file) | |
try: | |
result = file.validation | |
except File.validation.RelatedObjectDoesNotExist: | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment