mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
Refs #28965 -- Removed utils.http.cookie_date() per deprecation timeline.
This commit is contained in:
parent
6f23996a59
commit
958a7b4ca6
4 changed files with 6 additions and 45 deletions
|
@ -1,13 +1,12 @@
|
|||
import unittest
|
||||
from datetime import datetime
|
||||
|
||||
from django.test import SimpleTestCase, ignore_warnings
|
||||
from django.test import SimpleTestCase
|
||||
from django.utils.datastructures import MultiValueDict
|
||||
from django.utils.deprecation import RemovedInDjango30Warning
|
||||
from django.utils.http import (
|
||||
base36_to_int, cookie_date, escape_leading_slashes, http_date,
|
||||
int_to_base36, is_safe_url, is_same_domain, parse_etags, parse_http_date,
|
||||
quote_etag, urlencode, urlquote, urlquote_plus, urlsafe_base64_decode,
|
||||
base36_to_int, escape_leading_slashes, http_date, int_to_base36,
|
||||
is_safe_url, is_same_domain, parse_etags, parse_http_date, quote_etag,
|
||||
urlencode, urlquote, urlquote_plus, urlsafe_base64_decode,
|
||||
urlsafe_base64_encode, urlunquote, urlunquote_plus,
|
||||
)
|
||||
|
||||
|
@ -279,11 +278,6 @@ class HttpDateProcessingTests(unittest.TestCase):
|
|||
t = 1167616461.0
|
||||
self.assertEqual(http_date(t), 'Mon, 01 Jan 2007 01:54:21 GMT')
|
||||
|
||||
@ignore_warnings(category=RemovedInDjango30Warning)
|
||||
def test_cookie_date(self):
|
||||
t = 1167616461.0
|
||||
self.assertEqual(cookie_date(t), 'Mon, 01-Jan-2007 01:54:21 GMT')
|
||||
|
||||
def test_parsing_rfc1123(self):
|
||||
parsed = parse_http_date('Sun, 06 Nov 1994 08:49:37 GMT')
|
||||
self.assertEqual(datetime.utcfromtimestamp(parsed), datetime(1994, 11, 6, 8, 49, 37))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue