diff options
author | INADA Naoki <methane@users.noreply.github.com> | 2018-06-19 08:28:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-19 08:28:50 (GMT) |
commit | 698865dcbb302ae742b76be883822f1563764ff9 (patch) | |
tree | 28064c6e361c4e7af8e4ef3db85c82f64e3dbd67 /Lib/test | |
parent | cb970730e3ca2522e9b1700dcaf0a06b7e898db6 (diff) | |
download | cpython-698865dcbb302ae742b76be883822f1563764ff9.zip cpython-698865dcbb302ae742b76be883822f1563764ff9.tar.gz cpython-698865dcbb302ae742b76be883822f1563764ff9.tar.bz2 |
bpo-33843: Remove deprecated stuff in cgi module (GH-7662)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_cgi.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py index 4f2bba1..b284a0d 100644 --- a/Lib/test/test_cgi.py +++ b/Lib/test/test_cgi.py @@ -4,7 +4,6 @@ import os import sys import tempfile import unittest -import warnings from collections import namedtuple from io import StringIO, BytesIO from test import support @@ -163,15 +162,6 @@ Content-Length: 3 fs = cgi.FieldStorage(headers={'content-type':'text/plain'}) self.assertRaises(TypeError, bool, fs) - def test_escape(self): - # cgi.escape() is deprecated. - with warnings.catch_warnings(): - warnings.filterwarnings('ignore', r'cgi\.escape', - DeprecationWarning) - self.assertEqual("test & string", cgi.escape("test & string")) - self.assertEqual("<test string>", cgi.escape("<test string>")) - self.assertEqual(""test string"", cgi.escape('"test string"', True)) - def test_strict(self): for orig, expect in parse_strict_test_cases: # Test basic parsing @@ -449,20 +439,6 @@ this is the content of the fake file v = gen_result(data, environ) self.assertEqual(result, v) - def test_deprecated_parse_qs(self): - # this func is moved to urllib.parse, this is just a sanity check - with check_warnings(('cgi.parse_qs is deprecated, use urllib.parse.' - 'parse_qs instead', DeprecationWarning)): - self.assertEqual({'a': ['A1'], 'B': ['B3'], 'b': ['B2']}, - cgi.parse_qs('a=A1&b=B2&B=B3')) - - def test_deprecated_parse_qsl(self): - # this func is moved to urllib.parse, this is just a sanity check - with check_warnings(('cgi.parse_qsl is deprecated, use urllib.parse.' - 'parse_qsl instead', DeprecationWarning)): - self.assertEqual([('a', 'A1'), ('b', 'B2'), ('B', 'B3')], - cgi.parse_qsl('a=A1&b=B2&B=B3')) - def test_parse_header(self): self.assertEqual( cgi.parse_header("text/plain"), |