aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2015-10-06 16:41:01 -0500
committerLinaro Code Review <review@review.linaro.org>2015-10-07 14:55:55 +0000
commit5b3cf1c6f84c30ee82e364a9e31445d1275859fd (patch)
treecc260ba5bd014181dc7d0b3a13825b3efd31cb28
parent429ef8e153baeb166dcc08b720771c5f91ca4e8e (diff)
downloadlinaro-license-protection-5b3cf1c6f84c30ee82e364a9e31445d1275859fd.tar.gz
bug #1835: get-textile-files broke2015.10
The API for dir_list was changed, but the call in get_textile_files was missed. Since this function is very easy to forget about, I've added a unit test to help prevent future breakage. Change-Id: I8666a0adcf78e7da19f822ce5d3757c6a42188f9
-rw-r--r--license_protected_downloads/tests/test_views.py6
-rw-r--r--license_protected_downloads/views.py2
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: