#NEWLINE# def test_quotas_defaults( self ) : #NEWLINE# #INDENT# PATH = ( 'projects/%s' % ( self . PROJECT , ) ) #NEWLINE# MANAGED_ZONES = 1234 #NEWLINE# RRS_PER_RRSET = 23 #NEWLINE# RRSETS_PER_ZONE = 345 #NEWLINE# RRSET_ADDITIONS = 456 #NEWLINE# RRSET_DELETIONS = 567 #NEWLINE# TOTAL_SIZE = 67890 #NEWLINE# DATA = { #NEWLINE# #INDENT# 'quota' : { #NEWLINE# #INDENT# 'managedZones' : str ( MANAGED_ZONES ) , #NEWLINE# 'resourceRecordsPerRrset' : str ( RRS_PER_RRSET ) , #NEWLINE# 'rrsetsPerManagedZone' : str ( RRSETS_PER_ZONE ) , #NEWLINE# 'rrsetAdditionsPerChange' : str ( RRSET_ADDITIONS ) , #NEWLINE# 'rrsetDeletionsPerChange' : str ( RRSET_DELETIONS ) , #NEWLINE# 'totalRrdataSizePerChange' : str ( TOTAL_SIZE ) , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# CONVERTED = dict ( [ ( key , int ( value ) ) for ( key , value ) in DATA [ 'quota' ] . items ( ) ] ) #NEWLINE# creds = _Credentials ( ) #NEWLINE# client = self . _makeOne ( self . PROJECT , creds ) #NEWLINE# conn = client . connection = _Connection ( DATA ) #NEWLINE# quotas = client . quotas ( ) #NEWLINE# self . assertEqual ( quotas , CONVERTED ) #NEWLINE# self . assertEqual ( len ( conn . _requested ) , 1 ) #NEWLINE# req = conn . _requested [ 0 ] #NEWLINE# self . assertEqual ( req [ 'method' ] , 'GET' ) #NEWLINE# self . assertEqual ( req [ 'path' ] , ( '/%s' % PATH ) )