diff options
author | Felix Yan <felixonmars@gmail.com> | 2014-07-25 10:53:17 +0800 |
---|---|---|
committer | Felix Yan <felixonmars@gmail.com> | 2014-07-25 10:53:17 +0800 |
commit | 3157a380af8775309bcd50c0f6eb6b97e7d8fd84 (patch) | |
tree | 3bbcdf32ecec5532b998d0be5324835e91eee137 | |
parent | f7b79807ee728a08a1ce59966ceefc39b0c0c2e4 (diff) | |
download | boto-3157a380af8775309bcd50c0f6eb6b97e7d8fd84.tar.gz |
logs module: enable unit tests in python 3
-rw-r--r-- | boto/logs/layer1.py | 7 | ||||
-rwxr-xr-x | tests/test.py | 1 | ||||
-rw-r--r-- | tests/unit/logs/test_layer1.py | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/boto/logs/layer1.py b/boto/logs/layer1.py index 52d7791e..254e2855 100644 --- a/boto/logs/layer1.py +++ b/boto/logs/layer1.py @@ -20,16 +20,12 @@ # IN THE SOFTWARE. # -try: - import json -except ImportError: - import simplejson as json - import boto from boto.connection import AWSQueryConnection from boto.regioninfo import RegionInfo from boto.exception import JSONResponseError from boto.logs import exceptions +from boto.compat import json class CloudWatchLogsConnection(AWSQueryConnection): @@ -579,4 +575,3 @@ class CloudWatchLogsConnection(AWSQueryConnection): exception_class = self._faults.get(fault_name, self.ResponseError) raise exception_class(response.status, response.reason, body=json_body) - diff --git a/tests/test.py b/tests/test.py index 3fa2fb87..8c447e79 100755 --- a/tests/test.py +++ b/tests/test.py @@ -50,6 +50,7 @@ PY3_WHITELIST = ( 'tests/unit/glacier', 'tests/unit/iam', 'tests/unit/ec2', + 'tests/unit/logs', 'tests/unit/manage', 'tests/unit/mws', 'tests/unit/provider', diff --git a/tests/unit/logs/test_layer1.py b/tests/unit/logs/test_layer1.py index 9b8dc2ef..7aae5b09 100644 --- a/tests/unit/logs/test_layer1.py +++ b/tests/unit/logs/test_layer1.py @@ -13,7 +13,7 @@ class TestDescribeLogs(AWSMockServiceTestCase): def test_describe(self): self.set_http_response(status_code=200) api_response = self.service_connection.describe_log_groups() - + self.assertEqual(0, len(api_response['logGroups'])) self.assert_request_parameters({}) |