コード例 #1
0
 def __init__(self, *args, **kw):
     unittest.TestCase.__init__(self, *args, **kw)
     self.url = BASE_URL
     if len(sys.argv) > 1:
         self.url = sys.argv[1]
     print "init ", self.url
     self.resource = WebdavClient.CollectionStorer(self.url)
コード例 #2
0
 def setCollectionStorerToPath(self, path):
     try:
         self.resource = WebdavClient.CollectionStorer(self.url + path, self.resource.connection)
         return True
     except AuthorizationError as AuthError:
         self.resendAuthorization(AuthError)
     except WebdavError:
         return False
コード例 #3
0
 def setupConnection(self):
     if (self.connection != None):
         self.connection = None
     try:
         self.resource = WebdavClient.CollectionStorer(self.url, self.connection)
         self.determineAuthentication()
         return True
     except WebdavError:
         raise HTTPException
コード例 #4
0
 def __init__(self, *args, **kw):
     unittest.TestCase.__init__(self, *args, **kw)
     self.url = url
     print "init ", self.url
     self.resource = WebdavClient.CollectionStorer(
         self.url, ClientTestCase.connection)
     if not ClientTestCase.connection:
         ClientTestCase.connection = self.resource.connection
     if len(user) > 0:
         self.resource.connection.addBasicAuthorization(user, password)
コード例 #5
0
 def __init__(self, *args, **kw):
     unittest.TestCase.__init__(self, *args, **kw)
     print "init URL=", url
     self.resource = WebdavClient.CollectionStorer(
         url, ExtensionTestCase.connection)
     if not ExtensionTestCase.connection:
         ExtensionTestCase.connection = self.resource.connection
     if user:
         print "User", user, "Password:", password
         self.resource.connection.addBasicAuthorization(user, password)
コード例 #6
0
 def __init__(self, *args, **kw):
     unittest.TestCase.__init__(self, *args, **kw)
     print "init URL=", url
     self.resource = WebdavClient.CollectionStorer(
         url, UnicodeTestCase.connection)
     if not UnicodeTestCase.connection:
         UnicodeTestCase.connection = self.resource.connection
     if user:
         print "User", user, "Password:"******"slide") < 0:  # is this a Tamino server ?
         self.resource.connection.TAMINO_URL_ENCODE_BUG = 0
コード例 #7
0
def valid_collection(directory, user, password):
    resource = WebdavClient.CollectionStorer(directory)
    resource.connection.addBasicAuthorization(user, password)
    return resource
コード例 #8
0
 def setUp(self):
     self.resource = WebdavClient.CollectionStorer(self.url)
     self.resource.connection.addBasicAuthorization(self.username,
                                                    self.password)