#NEWLINE# def test_unlimited_ram( self ) : #NEWLINE# #INDENT# self . flags ( quota_instances = ( - 1 ) , quota_ram = ( 2 * 2048 ) , quota_cores = ( - 1 ) ) #NEWLINE# instance_type = self . _get_instance_type ( 'm1.small' ) #NEWLINE# num_instances = quota . allowed_instances ( self . context , 100 , instance_type ) #NEWLINE# self . assertEqual ( num_instances , 2 ) #NEWLINE# db . quota_create ( self . context , self . project_id , 'ram' , None ) #NEWLINE# num_instances = quota . allowed_instances ( self . context , 100 , instance_type ) #NEWLINE# self . assertEqual ( num_instances , 100 ) #NEWLINE# num_instances = quota . allowed_instances ( self . context , 101 , instance_type ) #NEWLINE# self . assertEqual ( num_instances , 101 )