Home | History | Annotate | Download | only in test

Lines Matching refs:cgi

2 import cgi
10 # will completely confuse the test of the cgi module
14 cgi.sys = HackedSysModule()
53 return cgi.parse(fp, env, strict_parsing=1)
113 form = cgi.FieldStorage(fp=fake_stdin, environ=environ)
124 self.assertEqual("test & string", cgi.escape("test & string"))
125 self.assertEqual("&lt;test string&gt;", cgi.escape("<test string>"))
126 self.assertEqual("&quot;test string&quot;", cgi.escape('"test string"', True))
137 fcd = cgi.FormContentDict(env)
138 sd = cgi.SvFormContentDict(env)
139 fs = cgi.FieldStorage(environ=env)
181 d = cgi.InterpFormContentDict(env)
189 cgi.log("Testing")
191 cgi.logfp = StringIO()
192 cgi.initlog("%s", "Testing initlog 1")
193 cgi.log("%s", "Testing log 2")
194 self.assertEqual(cgi.logfp.getvalue(), "Testing initlog 1\nTesting log 2\n")
196 cgi.logfp = None
197 cgi.logfile = "/dev/null"
198 cgi.initlog("%s", "Testing log 3")
199 cgi.log("Testing log 4")
229 fs = cgi.FieldStorage(fp=f, environ=env)
258 fs = cgi.FieldStorage(fp=StringIO(postdata), environ=env)
348 with check_warnings(('cgi.parse_qs is deprecated, use urlparse.'
351 cgi.parse_qs('a=A1&b=B2&B=B3'))
355 with check_warnings(('cgi.parse_qsl is deprecated, use urlparse.'
358 cgi.parse_qsl('a=A1&b=B2&B=B3'))
362 cgi.parse_header("text/plain"),
365 cgi.parse_header("text/vnd.just.made.this.up ; "),
368 cgi.parse_header("text/plain;charset=us-ascii"),
371 cgi.parse_header('text/plain ; charset="us-ascii"'),
374 cgi.parse_header('text/plain ; charset="us-ascii"; another=opt'),
377 cgi.parse_header('attachment; filename="silly.txt"'),
380 cgi.parse_header('attachment; filename="strange;name"'),
383 cgi.parse_header('attachment; filename="strange;name";size=123;'),
386 cgi.parse_header('form-data; name="files"; filename="fo\\"o;bar"'),