1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #24336 -- Made django.conf.urls.static() ignore all absolute URLs

This commit is contained in:
Claude Paroz
2018-07-23 18:32:46 +02:00
parent cdcf4164be
commit 2a74ceb5f3
2 changed files with 5 additions and 3 deletions

View File

@@ -153,8 +153,9 @@ class StaticHelperTest(StaticTests):
static('')
def test_special_prefix(self):
"""No URLs are served if prefix contains '://'."""
self.assertEqual(static('http://'), [])
"""No URLs are served if prefix contains a netloc part."""
self.assertEqual(static('http://example.org'), [])
self.assertEqual(static('//example.org'), [])
class StaticUtilsTests(unittest.TestCase):