dc.get_creds(self, cr, uid)
dc.gd_options(path=cr.dbname, expect={'DAV': ['1',]})
-
+ I will test the propnames at the document root
+-
+ !python {model: ir.attachment}: |
+ from document_webdav import test_davclient as te
+ dc = te.DAVClient()
+ dc.get_creds(self, cr, uid)
+ dc.gd_propname(path=cr.dbname+'/Documents/')
+-
+ I will test the ETags of the document root
+-
+ !python {model: ir.attachment}: |
+ from document_webdav import test_davclient as te
+ dc = te.DAVClient()
+ dc.get_creds(self, cr, uid)
+ dc.gd_getetag(path=cr.dbname+'/Documents/')
+
+-
+ I will now ls -l the document root.
+-
+ !python {model: ir.attachment}: |
+ from document_webdav import test_davclient as te
+ dc = te.DAVClient()
+ dc.get_creds(self, cr, uid)
+ res = dc.gd_lsl(path=cr.dbname+'/Documents/')
+ for lin in res:
+ print "%(type)s\t%(uid)s\t%(gid)s\t%(size)s\t%(mtime)s\t%(name)s" % lin
+-
+ I will put a file to the server
+-
+ !python {model: ir.attachment}: |
+ from document_webdav import test_davclient as te
+ import addons
+ dc = te.DAVClient()
+ dc.get_creds(self, cr, uid)
+ tdp = addons.get_module_resource('document_webdav', 'test_davclient.py')
+ res = dc.gd_put(path=cr.dbname+'/Documents/test_davclient.py', srcpath=tdp)
+-
+ I will try to get the file from the root
+-
+ !python {model: ir.attachment}: |
+ from document_webdav import test_davclient as te
+ import addons
+ dc = te.DAVClient()
+ dc.get_creds(self, cr, uid)
+ tdp = addons.get_module_resource('document_webdav', 'test_davclient.py')
+ res = dc.gd_get(path=cr.dbname+'/Documents/test_davclient.py', compare=tdp)