diff options
-rw-r--r-- | license_protected_downloads/tests/test_views.py | 6 | ||||
-rw-r--r-- | license_protected_downloads/views.py | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/license_protected_downloads/tests/test_views.py b/license_protected_downloads/tests/test_views.py index 2d10920..9634eb2 100644 --- a/license_protected_downloads/tests/test_views.py +++ b/license_protected_downloads/tests/test_views.py @@ -1,6 +1,7 @@ __author__ = 'dooferlad' import hashlib +import json import os import unittest import urlparse @@ -231,6 +232,11 @@ class HeaderTests(BaseServeViewTest): self.assertEquals(200, resp.status_code) self.assertIn('<a href="#tabs-2">Git Descriptions</a>', resp.content) + def test_get_textile_files(self): + resp = self.client.get( + '/get-textile-files?path=~linaro-android/staging-panda/') + self.assertIn('EULA', json.loads(resp.content)) + class ViewTests(BaseServeViewTest): def test_license_directly(self): diff --git a/license_protected_downloads/views.py b/license_protected_downloads/views.py index 08c101b..8552076 100644 --- a/license_protected_downloads/views.py +++ b/license_protected_downloads/views.py @@ -246,7 +246,7 @@ def file_server_get(request, path): def get_textile_files(request): artifact = find_artifact(request, request.GET.get("path")) - dir_list(request, artifact) # required for s3 + dir_list(artifact) # required for s3 rendered_files = RenderTextFiles.find_and_render(artifact) ann = artifact.get_annotated_manifest() if ann: |