From 1cd277224685654a82489881f90d93a32571b7b2 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Mon, 6 Jun 2016 01:53:28 +0000 Subject: =?UTF-8?q?Issue=20#27105:=20Add=20cgi.test()=20to=20=5F=5Fall=5F?= =?UTF-8?q?=5F,=20based=20on=20Jacek=20Ko=C5=82odziej=E2=80=99s=20patch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Lib/cgi.py | 2 +- Lib/test/test_cgi.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Lib/cgi.py b/Lib/cgi.py index 189c6d5..233a496 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -45,7 +45,7 @@ import tempfile __all__ = ["MiniFieldStorage", "FieldStorage", "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_environ_usage", "escape"] diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py index ab9f6ab..1647849 100644 --- a/Lib/test/test_cgi.py +++ b/Lib/test/test_cgi.py @@ -7,6 +7,7 @@ import unittest import warnings from collections import namedtuple from io import StringIO, BytesIO +from test import support class HackedSysModule: # 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"'), ("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" -- cgit v0.12