#NEWLINE# def test_Flash_Upload( self ) : #NEWLINE# #INDENT# headers = [ ( 'Accept' , 'text/*' ) , ( 'Content-Type' , 'multipart/form-data; boundary=----------KM7Ij5cH2KM7Ef1gL6ae0ae0cH2gL6' ) , ( 'User-Agent' , 'Shockwave Flash' ) , ( 'Host' , 'www.example.com:54583' ) , ( 'Content-Length' , '499' ) , ( 'Connection' , 'Keep-Alive' ) , ( 'Cache-Control' , 'no-cache' ) ] #NEWLINE# filedata = ntob ( '<?xml version="1.0" encoding="UTF-8"?>\r\n<projectDescription>\r\n</projectDescription>\r\n' ) #NEWLINE# body = ( ( ntob ( '------------KM7Ij5cH2KM7Ef1gL6ae0ae0cH2gL6\r\nContent-Disposition: form-data; name="Filename"\r\n\r\n.project\r\n------------KM7Ij5cH2KM7Ef1gL6ae0ae0cH2gL6\r\nContent-Disposition: form-data; name="Filedata"; filename=".project"\r\nContent-Type: application/octet-stream\r\n\r\n' ) + filedata ) + ntob ( '\r\n------------KM7Ij5cH2KM7Ef1gL6ae0ae0cH2gL6\r\nContent-Disposition: form-data; name="Upload"\r\n\r\nSubmit Query\r\n------------KM7Ij5cH2KM7Ef1gL6ae0ae0cH2gL6--' ) ) #NEWLINE# self . getPage ( '/flashupload' , headers , 'POST' , filedata ) #NEWLINE# self . assertBody ( ( 'Upload: Submit Query, Filename: .project, Filedata: %r' % filedata ) )