(self)
| 1438 | self.cgi = None |
| 1439 | |
| 1440 | def test_cgi_get(self): |
| 1441 | with os_helper.EnvironmentVarGuard() as env: |
| 1442 | env['REQUEST_METHOD'] = 'GET' |
| 1443 | # if the method is GET and no request_text is given, it runs handle_get |
| 1444 | # get sysout output |
| 1445 | with captured_stdout(encoding=self.cgi.encoding) as data_out: |
| 1446 | self.cgi.handle_request() |
| 1447 | |
| 1448 | # parse Status header |
| 1449 | data_out.seek(0) |
| 1450 | handle = data_out.read() |
| 1451 | status = handle.split()[1] |
| 1452 | message = ' '.join(handle.split()[2:4]) |
| 1453 | |
| 1454 | self.assertEqual(status, '400') |
| 1455 | self.assertEqual(message, 'Bad Request') |
| 1456 | |
| 1457 | |
| 1458 | def test_cgi_xmlrpc_response(self): |
nothing calls this directly
no test coverage detected