summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-11-29 15:47:47 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-11-29 15:47:47 +0000
commitb6002d4af6330fd828db10afb450bfb7d5f8d628 (patch)
treeb6a05e4e11adac36ae97c665363991b509e2315d /tests
parent3c272792d6207147c23d93baa282c0e2e5a4f874 (diff)
Fixed #1291 -- Fixed a potential infinite loop for some URL constructions in
the development server. Thanks, Graham Carlyle. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/views/tests/static.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/regressiontests/views/tests/static.py b/tests/regressiontests/views/tests/static.py
index 0a67cf543e..c731b249e8 100644
--- a/tests/regressiontests/views/tests/static.py
+++ b/tests/regressiontests/views/tests/static.py
@@ -12,4 +12,12 @@ class StaticTests(TestCase):
for filename in media_files:
response = self.client.get('/views/site_media/%s' % filename)
file = open(path.join(media_dir, filename))
- self.assertEquals(file.read(), response.content) \ No newline at end of file
+ self.assertEquals(file.read(), response.content)
+
+ def test_copes_with_empty_path_component(self):
+ file_name = 'file.txt'
+ response = self.client.get('/views/site_media//%s' % file_name)
+ file = open(path.join(media_dir, file_name))
+ self.assertEquals(file.read(), response.content)
+
+