#NEWLINE# def _foo_bar_container_foo_test_stream_data_MULTIPART( self , method , url , body , headers ) : #NEWLINE# #INDENT# headers = { #NEWLINE# #INDENT# 'etag' : '"0cc175b9c0f1b6a831c399e269772661"' , #NEWLINE# #UNINDENT# } #NEWLINE# TEST_ID = 'VXBsb2FkIElEIGZvciA2aWWpbmcncyBteS1tb3ZpZS5tMnRzIHVwbG9hZA' #NEWLINE# query_string = urlparse . urlsplit ( url ) . query #NEWLINE# query = parse_qs ( query_string ) #NEWLINE# if ( not query . get ( 'uploadId' , False ) ) : #NEWLINE# #INDENT# self . fail ( 'Request doesnt contain uploadId query parameter' ) #NEWLINE# #UNINDENT# upload_id = query [ 'uploadId' ] [ 0 ] #NEWLINE# if ( upload_id != TEST_ID ) : #NEWLINE# #INDENT# self . fail ( 'first uploadId doesnt match TEST_ID' ) #NEWLINE# #UNINDENT# if ( method == 'PUT' ) : #NEWLINE# #INDENT# if ( not query . get ( 'partNumber' , False ) ) : #NEWLINE# #INDENT# self . fail ( 'Request is missing partNumber query parameter' ) #NEWLINE# #UNINDENT# body = '' #NEWLINE# return ( httplib . OK , body , headers , httplib . responses [ httplib . OK ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( method == 'DELETE' ) : #NEWLINE# #INDENT# body = '' #NEWLINE# return ( httplib . NO_CONTENT , body , headers , httplib . responses [ httplib . NO_CONTENT ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# commit = ET . fromstring ( body ) #NEWLINE# count = 0 #NEWLINE# for part in commit . findall ( 'Part' ) : #NEWLINE# #INDENT# count += 1 #NEWLINE# part_no = part . find ( 'PartNumber' ) . text #NEWLINE# etag = part . find ( 'ETag' ) . text #NEWLINE# self . assertEqual ( part_no , str ( query ) ) #NEWLINE# self . assertEqual ( etag , headers [ 'etag' ] ) #NEWLINE# #UNINDENT# self . assertTrue ( ( count >= 1 ) ) #NEWLINE# body = self . fixtures . load ( 'complete_multipart.xml' ) #NEWLINE# return ( httplib . OK , body , headers , httplib . responses [ httplib . OK ] )