Override methods for customizing communication with WebDAV servers.

Fix #31 and #30
This commit is contained in:
Evgeny Ezhov 2020-01-20 17:31:25 -08:00
parent 95bea2182c
commit 336db8ae19
5 changed files with 31 additions and 8 deletions

View file

@ -21,7 +21,10 @@ class BaseClientTestCase(unittest.TestCase):
options = {
'webdav_hostname': 'http://localhost:8585',
'webdav_login': 'alice',
'webdav_password': 'secret1234'
'webdav_password': 'secret1234',
'webdav_override_methods': {
'check': 'GET'
}
}
# options = {

View file

@ -224,6 +224,9 @@ class ClientTestCase(BaseClientTestCase):
def test_valid(self):
self.assertTrue(self.client.valid())
def test_check_is_overridden(self):
self.assertEqual('GET', self.client.requests['check'])
if __name__ == '__main__':
unittest.main()