#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . neutron : ( 'is_extension_supported' , 'tenant_quota_update' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# @ test . update_settings ( OPENSTACK_NEUTRON_NETWORK = { #NEWLINE# #INDENT# 'enable_quotas' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_add_project_post_with_neutron( self ) : #NEWLINE# #INDENT# quota_data = self . neutron_quotas . first ( ) #NEWLINE# neutron_updated_quota = dict ( [ ( neutron_updated_quota , quota_data . get ( key ) . limit ) for key in quotas . NEUTRON_QUOTA_FIELDS ] ) #NEWLINE# api . neutron . is_extension_supported ( IsA ( http . HttpRequest ) , 'security-group' ) . AndReturn ( True ) #NEWLINE# api . neutron . is_extension_supported ( IsA ( http . HttpRequest ) , 'quotas' ) . MultipleTimes ( ) . AndReturn ( True ) #NEWLINE# api . neutron . tenant_quota_update ( IsA ( http . HttpRequest ) , self . tenant . id , ** neutron_updated_quota ) #NEWLINE# self . test_add_project_post ( neutron = True )