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)
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
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
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)
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)
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
def valid_collection(directory, user, password): resource = WebdavClient.CollectionStorer(directory) resource.connection.addBasicAuthorization(user, password) return resource
def setUp(self): self.resource = WebdavClient.CollectionStorer(self.url) self.resource.connection.addBasicAuthorization(self.username, self.password)