diff --git a/dns/google/cloud/dns/client.py b/dns/google/cloud/dns/client.py index 386190bab7a0..b7739928cd68 100644 --- a/dns/google/cloud/dns/client.py +++ b/dns/google/cloud/dns/client.py @@ -68,7 +68,7 @@ def quotas(self): return {key: int(value) for key, value in resp['quota'].items() - if key != 'kind'} + if key != 'kind' and type(value) is not list} def list_zones(self, max_results=None, page_token=None): """List zones for the project associated with this client. diff --git a/dns/tests/unit/test_client.py b/dns/tests/unit/test_client.py index 72d8e5d42743..bceda379339d 100644 --- a/dns/tests/unit/test_client.py +++ b/dns/tests/unit/test_client.py @@ -97,10 +97,12 @@ def test_quotas_w_kind_key(self): 'rrsetAdditionsPerChange': str(RRSET_ADDITIONS), 'rrsetDeletionsPerChange': str(RRSET_DELETIONS), 'totalRrdataSizePerChange': str(TOTAL_SIZE), + 'whitelistedKeySpecs': [{"x":"y","a":"b"},{"x":"y","z":"a"}] } } CONVERTED = {key: int(value) - for key, value in DATA['quota'].items()} + for key, value in DATA['quota'].items() + if type(value) is not list} WITH_KIND = {'quota': DATA['quota'].copy()} WITH_KIND['quota']['kind'] = 'dns#quota' creds = _make_credentials()