1 #!/usr/bin/env python 2 3 from boto.logs.layer1 import CloudWatchLogsConnection 4 from tests.unit import AWSMockServiceTestCase 5 6 7 class TestDescribeLogs(AWSMockServiceTestCase): 8 connection_class = CloudWatchLogsConnection 9 10 def default_body(self): 11 return b'{"logGroups": []}' 12 13 def test_describe(self): 14 self.set_http_response(status_code=200) 15 api_response = self.service_connection.describe_log_groups() 16 17 self.assertEqual(0, len(api_response['logGroups'])) 18 19 self.assert_request_parameters({}) 20 21 target = self.actual_request.headers['X-Amz-Target'] 22 self.assertTrue('DescribeLogGroups' in target) 23