diff options
author | James Tunnicliffe <james.tunnicliffe@linaro.org> | 2012-08-22 12:29:56 +0100 |
---|---|---|
committer | James Tunnicliffe <james.tunnicliffe@linaro.org> | 2012-08-22 12:29:56 +0100 |
commit | f2992e6643c2e8771136685461d84b6bd4c9e781 (patch) | |
tree | c44b1de88525cc72189756cf3fc62241fd5f37ef /license_protected_downloads | |
parent | 7569cc83aa8be5254bad38e0b1d7ef392f9ee8c7 (diff) |
Added another test.
Diffstat (limited to 'license_protected_downloads')
3 files changed, 10 insertions, 0 deletions
diff --git a/license_protected_downloads/tests/test_views.py b/license_protected_downloads/tests/test_views.py index 4f8bedb..c5beaa9 100644 --- a/license_protected_downloads/tests/test_views.py +++ b/license_protected_downloads/tests/test_views.py @@ -420,5 +420,15 @@ class ViewTests(TestCase): # 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") + + if __name__ == '__main__': unittest.main() diff --git a/license_protected_downloads/tests/testserver_root/open/.hidden.txt b/license_protected_downloads/tests/testserver_root/open/.hidden.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/license_protected_downloads/tests/testserver_root/open/.hidden.txt diff --git a/license_protected_downloads/tests/testserver_root/open/OPEN-EULA.txt b/license_protected_downloads/tests/testserver_root/open/OPEN-EULA.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/license_protected_downloads/tests/testserver_root/open/OPEN-EULA.txt |