#NEWLINE# def test_03_basic_create_resource_with_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 = col . 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# assert ( receipt . code == 201 ) #NEWLINE# assert ( receipt . location != None ) #NEWLINE# assert ( ( receipt . dom is None ) or ( receipt . parsed == True ) ) #NEWLINE# assert ( ( receipt . dom is None ) or ( receipt . valid == True ) )