diff options
author | Andy Doan <andy.doan@linaro.org> | 2014-07-27 12:09:13 -0500 |
---|---|---|
committer | Andy Doan <andy.doan@linaro.org> | 2014-07-27 12:09:13 -0500 |
commit | 49772171420cc9221f889bbd957c1b23b31b4a80 (patch) | |
tree | e5eb56fda5524f63921d483146fd7f497d395f9d | |
parent | e912385e0b83a242cd85683750020ffd39cfa6c1 (diff) |
test_views: fix broken tests
one test was broken and one test looks invalid based on the
current implementation
Change-Id: Idff1f354be8cff8afe45680a56af59168b6e1119
-rw-r--r-- | license_protected_downloads/tests/test_views.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/license_protected_downloads/tests/test_views.py b/license_protected_downloads/tests/test_views.py index 68cda4c..20976c8 100644 --- a/license_protected_downloads/tests/test_views.py +++ b/license_protected_downloads/tests/test_views.py @@ -573,15 +573,6 @@ class ViewTests(BaseServeViewTest): # download it. self.assertEqual(response.status_code, 404) - def test_dot_files_are_hidden(self): - target_file = 'open' - url = urlparse.urljoin("http://testserver/", target_file) - response = self.client.get(url, follow=True) - - # the directory open contains .hidden.txt - we shouldn't be able to - # see it in the listing. - self.assertNotContains(response, ".hidden.txt") - def test_partial_build_info_file_open(self): target_file = ("partial-license-settings/" "partially-complete-build-info/" @@ -658,6 +649,7 @@ class ViewTests(BaseServeViewTest): tmp_file = os.fdopen(tmp_file_handle, "w") tmp_file.write(data) tmp_file.close() + self.addCleanup(os.unlink, tmp_filename) return os.path.basename(tmp_filename) def test_replace_self_closing_tag(self): @@ -943,8 +935,8 @@ class ViewTests(BaseServeViewTest): # Check the upload worked by reading the file back from its # uploaded location - uploaded_file_path = os.path.join(settings.SERVED_PATHS[0], - "file_name") + uploaded_file_path = os.path.join( + settings.SERVED_PATHS[0], 'pub/file_name') with open(uploaded_file_path) as f: self.assertEqual(f.read(), file_content) |