Exemple #1
0
 def test_debug_log_contains_headers_and_body(self):
     # This test just verifies that the response headers/body
     # are in the debug log.  It's an integration test so that
     # we can refactor the code however we want, as long as we don't
     # lose this feature.
     session = botocore.session.get_session()
     client = session.create_client('s3', region_name='us-west-2')
     debug_log = six.StringIO()
     session.set_stream_logger('', logging.DEBUG, debug_log)
     client.list_buckets()
     debug_log_contents = debug_log.getvalue()
     self.assertIn('Response headers', debug_log_contents)
     self.assertIn('Response body', debug_log_contents)
Exemple #2
0
 def test_debug_log_contains_headers_and_body(self):
     # This test just verifies that the response headers/body
     # are in the debug log.  It's an integration test so that
     # we can refactor the code however we want, as long as we don't
     # lose this feature.
     session = botocore.session.get_session()
     client = session.create_client('s3', region_name='us-west-2')
     debug_log = StringIO()
     session.set_stream_logger('', logging.DEBUG, debug_log)
     client.list_buckets()
     debug_log_contents = debug_log.getvalue()
     self.assertIn('Response headers', debug_log_contents)
     self.assertIn('Response body', debug_log_contents)