#NEWLINE# def test_18_basic_replace_metadata( self ) : #NEWLINE# #INDENT# conn = Connection ( SSS_URL , user_name = SSS_UN , user_pass = SSS_PW , http_impl = http ) #NEWLINE# conn . get_service_document ( ) #NEWLINE# col = conn . sd . workspaces [ 0 ] [ 1 ] [ 0 ] #NEWLINE# e = Entry ( title = 'An entry only deposit' , id = 'asidjasidj' , dcterms_abstract = 'abstract' , dcterms_identifier = 'http://whatever/' ) #NEWLINE# receipt = conn . create ( col_iri = col . href , metadata_entry = e ) #NEWLINE# receipt = conn . get_deposit_receipt ( receipt . location ) #NEWLINE# ne = Entry ( title = 'A metadata update' , id = 'asidjasidj' , dcterms_abstract = 'new abstract' , dcterms_identifier = 'http://elsewhere/' ) #NEWLINE# new_receipt = conn . update ( dr = receipt , metadata_entry = ne ) #NEWLINE# assert ( ( new_receipt . code == 204 ) or ( new_receipt . code == 200 ) ) #NEWLINE# if ( new_receipt . code == 204 ) : #NEWLINE# #INDENT# assert ( new_receipt . dom is None ) #NEWLINE# #UNINDENT# if ( new_receipt . code == 200 ) : #NEWLINE# #INDENT# assert ( new_receipt . parsed == True ) #NEWLINE# assert ( new_receipt . valid == True )