diff options
| author | Tim Graham <timograham@gmail.com> | 2017-09-02 20:12:27 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-09-22 12:51:18 -0400 |
| commit | 96107e2844d27a7713152515051654ce70d57660 (patch) | |
| tree | b7a31e91c81256b0b8dd85a6786dfc5a46a44d9a /tests/utils_tests/test_http.py | |
| parent | e47b56d791eb6c81c6d83529b7a068959ea1c1ec (diff) | |
Refs #26956 -- Removed the host parameter of django.utils.http.is_safe_url().
Per deprecation timeline.
Diffstat (limited to 'tests/utils_tests/test_http.py')
| -rw-r--r-- | tests/utils_tests/test_http.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/utils_tests/test_http.py b/tests/utils_tests/test_http.py index 5ce91c3728..04c2d55380 100644 --- a/tests/utils_tests/test_http.py +++ b/tests/utils_tests/test_http.py @@ -1,10 +1,8 @@ import unittest from datetime import datetime -from django.test import ignore_warnings from django.utils import http from django.utils.datastructures import MultiValueDict -from django.utils.deprecation import RemovedInDjango21Warning class TestUtilsHttp(unittest.TestCase): @@ -107,8 +105,6 @@ class TestUtilsHttp(unittest.TestCase): 'http://2001:cdba:0000:0000:0000:0000:3257:9652]/', ) for bad_url in bad_urls: - with ignore_warnings(category=RemovedInDjango21Warning): - self.assertFalse(http.is_safe_url(bad_url, host='testserver'), "%s should be blocked" % bad_url) self.assertFalse( http.is_safe_url(bad_url, allowed_hosts={'testserver', 'testserver2'}), "%s should be blocked" % bad_url, @@ -127,8 +123,6 @@ class TestUtilsHttp(unittest.TestCase): 'path/http:2222222222', ) for good_url in good_urls: - with ignore_warnings(category=RemovedInDjango21Warning): - self.assertTrue(http.is_safe_url(good_url, host='testserver'), "%s should be allowed" % good_url) self.assertTrue( http.is_safe_url(good_url, allowed_hosts={'otherserver', 'testserver'}), "%s should be allowed" % good_url, |
