diff options
-rw-r--r-- | testing/legion/examples/http_example/http_client.py | 4 | ||||
-rw-r--r-- | testing/legion/examples/http_example/http_test.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/testing/legion/examples/http_example/http_client.py b/testing/legion/examples/http_example/http_client.py index 830ae62..3153cdf 100644 --- a/testing/legion/examples/http_example/http_client.py +++ b/testing/legion/examples/http_example/http_client.py @@ -20,8 +20,8 @@ def main(): args = GetArgs() conn = httplib.HTTPConnection(args.server, args.port) conn.request('GET', '/') - response = conn.getresponse() - assert response.read() == 'SUCCESS!' + response = conn.getresponse().read() + assert response == 'SUCCESS!', '%s != SUCCESS!' % response if __name__ == '__main__': diff --git a/testing/legion/examples/http_example/http_test.py b/testing/legion/examples/http_example/http_test.py index fe6e767..433a523 100644 --- a/testing/legion/examples/http_example/http_test.py +++ b/testing/legion/examples/http_example/http_test.py @@ -3,6 +3,7 @@ # found in the LICENSE file. import argparse +import logging import os import sys @@ -60,6 +61,8 @@ class HttpTest(legion_test_case.TestCase): ['python', 'http_client.py', '--server', server_ip, '--port', server_port]) client_proc.Wait() + logging.info('client_proc.stdout: %s', client_proc.ReadStdout()) + logging.info('client_proc.stderr: %s', client_proc.ReadStderr()) self.assertEqual(client_proc.GetReturncode(), 0) finally: if server_proc: |