예제 #1
0
    def testZimbraClientNoAuth(self):

        zclient = ZimbraClient('')
        zclient.transport = MockTransport()
        zclient.authenticator = MockAuthenticator()

        self.assertRaises(AuthException, zclient.invoke, '', '', {})
예제 #2
0
    def testZimbraClientAuth(self):

        zclient = ZimbraClient('')
        zclient.transport = MockTransport()
        zclient.authenticator = MockAuthenticator()

        zclient.authenticate(self.account_name, self.password)
예제 #3
0
파일: zclient.py 프로젝트: vipod/pyzimbra
    def testZimbraClientNoAuth(self):

        zclient = ZimbraClient('')
        zclient.transport = MockTransport()
        zclient.authenticator = MockAuthenticator()

        self.assertRaises(AuthException, zclient.invoke, '', '', {})
예제 #4
0
파일: zclient.py 프로젝트: vipod/pyzimbra
    def testZimbraClientAuth(self):

        zclient = ZimbraClient('')
        zclient.transport = MockTransport()
        zclient.authenticator = MockAuthenticator()

        zclient.authenticate(self.account_name, self.password)
예제 #5
0
    def testZimbraClientWrongAuth(self):

        zclient = ZimbraClient('')
        zclient.transport = MockTransport()
        zclient.authenticator = MockAuthenticator()

        self.assertRaises(AuthException, zclient.authenticate,
                          self.account_name, 'wrong')
예제 #6
0
파일: zclient.py 프로젝트: vipod/pyzimbra
    def testZimbraClientWrongAuth(self):

        zclient = ZimbraClient('')
        zclient.transport = MockTransport()
        zclient.authenticator = MockAuthenticator()

        self.assertRaises(AuthException, zclient.authenticate,
                          self.account_name, 'wrong')
예제 #7
0
    def testZimbraClientNoRequest(self):

        zclient = ZimbraClient('')
        zclient.transport = MockTransport()
        zclient.authenticator = MockAuthenticator()

        zclient.authenticate(self.account_name, self.password)

        self.assertRaises(ZimbraClientException, zclient.invoke, '', '', {})
예제 #8
0
파일: zclient.py 프로젝트: vipod/pyzimbra
    def testZimbraClientNoRequest(self):

        zclient = ZimbraClient('')
        zclient.transport = MockTransport()
        zclient.authenticator = MockAuthenticator()

        zclient.authenticate(self.account_name, self.password)

        self.assertRaises(ZimbraClientException, zclient.invoke, '', '', {})
예제 #9
0
파일: zclient.py 프로젝트: vipod/pyzimbra
    def testZimbraClientRequest(self):

        zclient = ZimbraClient('')
        zclient.transport = MockTransport()
        zclient.authenticator = MockAuthenticator()

        zclient.authenticate(self.account_name, self.password)

        params = {}
        res = zclient.invoke(zconstant.NS_ZIMBRA_ACC_URL,
                             sconstant.GetInfoRequest, params)

        self.assertEqual(self.account_name, res.name)
예제 #10
0
    def testZimbraClientRequest(self):

        zclient = ZimbraClient('')
        zclient.transport = MockTransport()
        zclient.authenticator = MockAuthenticator()

        zclient.authenticate(self.account_name, self.password)

        params = {}
        res = zclient.invoke(zconstant.NS_ZIMBRA_ACC_URL,
                             sconstant.GetInfoRequest,
                             params)

        self.assertEqual(self.account_name, res.name)