#NEWLINE# def test_exceed_counts_quota_copy_cross_account_verb( self ) : #NEWLINE# #INDENT# app = container_quotas . ContainerQuotaMiddleware ( FakeApp ( ) , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# a_c_cache = { #NEWLINE# #INDENT# 'storage_policy' : '0' , #NEWLINE# 'meta' : { #NEWLINE# #INDENT# 'quota-count' : '2' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'status' : 200 , #NEWLINE# 'object_count' : 1 , #NEWLINE# #UNINDENT# } #NEWLINE# a2_c_cache = { #NEWLINE# #INDENT# 'storage_policy' : '0' , #NEWLINE# 'meta' : { #NEWLINE# #INDENT# 'quota-count' : '1' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'status' : 200 , #NEWLINE# 'object_count' : 1 , #NEWLINE# #UNINDENT# } #NEWLINE# req = Request . blank ( '/v1/a/c2/o2' , environ = { #NEWLINE# #INDENT# 'REQUEST_METHOD' : 'COPY' , #NEWLINE# 'swift.container/a/c' : a_c_cache , #NEWLINE# 'swift.container/a2/c' : a2_c_cache , #NEWLINE# #UNINDENT# } , headers = { #NEWLINE# #INDENT# 'Destination' : '/c/o' , #NEWLINE# 'Destination-Account' : 'a2' , #NEWLINE# #UNINDENT# } ) #NEWLINE# res = req . get_response ( app ) #NEWLINE# self . assertEqual ( a_c_cache . status_int , 413 ) #NEWLINE# self . assertEqual ( res . body , 'Upload exceeds quota.' )