doc webdav: more tests in lib, yaml
[odoo/odoo.git] / addons / document_webdav / test / webdav_test1.yml
1 -
2     In order to test the document_ftp functionality
3 -
4     I open the HTTP port and perform an OPTIONS request to the server
5 -
6     !python {model: ir.attachment}: |
7         from document_webdav import test_davclient as te
8         reload(te) # reload..
9         dc = te.DAVClient()
10         dc.gd_options()
11         dc.get_creds(self, cr, uid)
12         dc.gd_options(path=cr.dbname, expect={'DAV': ['1',]})
13 -
14     I will test the propnames at the document root
15 -
16     !python {model: ir.attachment}: |
17         from document_webdav import test_davclient as te
18         dc = te.DAVClient()
19         dc.get_creds(self, cr, uid)
20         dc.gd_propname(path=cr.dbname+'/Documents/')
21 -
22     I will test the ETags of the document root
23 -
24     !python {model: ir.attachment}: |
25         from document_webdav import test_davclient as te
26         dc = te.DAVClient()
27         dc.get_creds(self, cr, uid)
28         dc.gd_getetag(path=cr.dbname+'/Documents/')
29
30 -
31     I will now ls -l the document root.
32 -
33     !python {model: ir.attachment}: |
34         from document_webdav import test_davclient as te
35         dc = te.DAVClient()
36         dc.get_creds(self, cr, uid)
37         res = dc.gd_lsl(path=cr.dbname+'/Documents/')
38         for lin in res:
39             print "%(type)s\t%(uid)s\t%(gid)s\t%(size)s\t%(mtime)s\t%(name)s" % lin