예제 #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)