Issue #27105: Add cgi.test() to __all__, based on Jacek Kołodziej’s patch

This commit is contained in:
Martin Panter 2016-06-06 01:53:28 +00:00
parent 2e747c4b8f
commit 1cd2772246
2 changed files with 7 additions and 1 deletions

View File

@ -45,7 +45,7 @@ import tempfile
__all__ = ["MiniFieldStorage", "FieldStorage", __all__ = ["MiniFieldStorage", "FieldStorage",
"parse", "parse_qs", "parse_qsl", "parse_multipart", "parse", "parse_qs", "parse_qsl", "parse_multipart",
"parse_header", "print_exception", "print_environ", "parse_header", "test", "print_exception", "print_environ",
"print_form", "print_directory", "print_arguments", "print_form", "print_directory", "print_arguments",
"print_environ_usage", "escape"] "print_environ_usage", "escape"]

View File

@ -7,6 +7,7 @@ import unittest
import warnings import warnings
from collections import namedtuple from collections import namedtuple
from io import StringIO, BytesIO from io import StringIO, BytesIO
from test import support
class HackedSysModule: class HackedSysModule:
# The regression test will have real values in sys.argv, which # The regression test will have real values in sys.argv, which
@ -473,6 +474,11 @@ this is the content of the fake file
cgi.parse_header('form-data; name="files"; filename="fo\\"o;bar"'), cgi.parse_header('form-data; name="files"; filename="fo\\"o;bar"'),
("form-data", {"name": "files", "filename": 'fo"o;bar'})) ("form-data", {"name": "files", "filename": 'fo"o;bar'}))
def test_all(self):
blacklist = {"logfile", "logfp", "initlog", "dolog", "nolog",
"closelog", "log", "maxlen", "valid_boundary"}
support.check__all__(self, cgi, blacklist=blacklist)
BOUNDARY = "---------------------------721837373350705526688164684" BOUNDARY = "---------------------------721837373350705526688164684"