#NEWLINE# def test_25_basic_add_content_to_resource_package( 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# 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 . add_file_to_resource ( receipt . edit_media , pkg , 'addition.zip' , mimetype = PACKAGE_MIME , packaging = 'http://purl.org/net/sword/package/SimpleZip' ) #NEWLINE# #UNINDENT# assert ( ( new_receipt . code >= 200 ) and ( new_receipt . code < 400 ) ) #NEWLINE# assert ( new_receipt . location is not None ) #NEWLINE# assert ( new_receipt . location == receipt . edit_media )