Commit a226fc0f authored by Nicolas Delaby's avatar Nicolas Delaby

This is an HTTPServer.zhttp_server not an HTTPServer.zwebdav_server,

force usage of manage_FTPget like zwebdav_server does


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37804 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0fed5db7
...@@ -137,12 +137,15 @@ class TestWebDavSupport(ERP5TypeTestCase): ...@@ -137,12 +137,15 @@ class TestWebDavSupport(ERP5TypeTestCase):
document_module = self.getDocumentModule() document_module = self.getDocumentModule()
document = document_module[filename] document = document_module[filename]
document_id = '%s-%s' % (document.getUid(), filename,) document_id = '%s-%s' % (document.getUid(), filename,)
# This is HTTPServer.zhttp_server not HTTPServer.zwebdav_server
# force usage of manage_FTPget like zwebdav_server does
response = self.publish('%s/%s' % (path, document_id), response = self.publish('%s/%s' % (path, document_id),
request_method='GET', request_method='GET',
stdin=StringIO(), stdin=StringIO(),
basic=self.authentication) basic=self.authentication)
self.assertEquals(response.getStatus(), httplib.OK) self.assertEquals(response.getStatus(), httplib.OK)
self.assertEquals(response.getBody(), document.getData()) self.assertEquals(response.getBody(), document.getData(),
'Error in getting data, get:%r' % response.getHeader('content-type'))
def test_PUT_on_web_page(self): def test_PUT_on_web_page(self):
"""Edit a web_page in webdav """Edit a web_page in webdav
...@@ -203,13 +206,16 @@ class TestWebDavSupport(ERP5TypeTestCase): ...@@ -203,13 +206,16 @@ class TestWebDavSupport(ERP5TypeTestCase):
document_module = self.getDocumentModule() document_module = self.getDocumentModule()
document = document_module[filename] document = document_module[filename]
response = self.publish(document.getPath(), # This is HTTPServer.zhttp_server not HTTPServer.zwebdav_server
# force usage of manage_FTPget like zwebdav_server does
response = self.publish(document.getPath()+'/manage_FTPget',
request_method='GET', request_method='GET',
stdin=StringIO(), stdin=StringIO(),
basic=self.authentication) basic=self.authentication)
self.assertEquals(response.getStatus(), httplib.OK) self.assertEquals(response.getStatus(), httplib.OK)
self.assertEquals(response.getBody(), document.getData()) self.assertEquals(response.getBody(), document.getData(),
'Error in getting data, get:%r' % response.getHeader('content-type'))
def test_PROPFIND_on_document(self): def test_PROPFIND_on_document(self):
"""test Metadata extraction from webdav protocol """test Metadata extraction from webdav protocol
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment