#NEWLINE# def test_17_advanced_replace_file_content( self ) : #NEWLINE# #INDENT# conn = Connection ( SSS_URL , user_name = SSS_UN , user_pass = SSS_PW , on_behalf_of = SSS_OBO , http_impl = http ) #NEWLINE# conn . get_service_document ( ) #NEWLINE# col = conn . sd . workspaces [ 0 ] [ 1 ] [ 0 ] #NEWLINE# with open ( PACKAGE ) as pkg : #NEWLINE# #INDENT# receipt = conn . create ( col_iri = col . href , payload = pkg , mimetype = PACKAGE_MIME , filename = 'example.zip' , packaging = 'http://purl.org/net/sword/package/SimpleZip' ) #NEWLINE# #UNINDENT# receipt = conn . get_deposit_receipt ( receipt . location ) #NEWLINE# with open ( PACKAGE ) as pkg : #NEWLINE# #INDENT# new_receipt = conn . update ( dr = receipt , payload = pkg , mimetype = PACKAGE_MIME , filename = 'update.zip' , packaging = 'http://purl.org/net/sword/package/SimpleZip' , metadata_relevant = True ) #NEWLINE# #UNINDENT# assert ( new_receipt . code == 204 ) #NEWLINE# assert ( new_receipt . dom is None )