#NEWLINE# def test_remove_tenant_access_with_no_admin_user( self ) : #NEWLINE# #INDENT# req = fakes . HTTPRequest . blank ( ( self . _prefix + '/flavors/2/action' ) , use_admin_context = False ) #NEWLINE# body = { #NEWLINE# #INDENT# 'removeTenantAccess' : { #NEWLINE# #INDENT# 'tenant' : 'proj2' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# remove_access = self . _get_remove_access ( ) #NEWLINE# self . assertRaises ( exception . AdminRequired , remove_access , req , '2' , body = body )