Пример #1
0
 def test_sendRest(self):
     try:
         client = AgateClient.buildWithAuthentication(server="%s:%s" % (self.SERVER, self.PORT), user='******',
                                                     password='******')
         self.__sendSimpleRequest(client.new_request())
     except Exception, e:
         self.fail(e)
Пример #2
0
    def test_sendRestBadCredentials(self):
        client = AgateClient.buildWithAuthentication(server="%s:%s" %
                                                     (self.SERVER, self.PORT),
                                                     user='******',
                                                     password='******')

        self.assertRaises(Exception, self.__sendSimpleRequest,
                          client.new_request())
Пример #3
0
    def test_sendRestBadServer(self):
        client = AgateClient.buildWithAuthentication(
            server='http://deadbeef:8081',
            user='******',
            password='******')

        self.assertRaises(Exception, self.__sendSimpleRequest,
                          client.new_request())
Пример #4
0
 def test_sendRest(self):
     try:
         client = AgateClient.buildWithAuthentication(
             server="%s:%s" % (self.SERVER, self.PORT),
             user='******',
             password='******')
         self.__sendSimpleRequest(client.new_request())
     except Exception, e:
         self.fail(e)
Пример #5
0
    def test_sendRestBadCredentials(self):
        client = AgateClient.buildWithAuthentication(server="%s:%s" % (self.SERVER, self.PORT), user='******',
                                                    password='******')

        self.assertRaises(Exception, self.__sendSimpleRequest, client.new_request())
Пример #6
0
    def test_sendRestBadServer(self):
        client = AgateClient.buildWithAuthentication(server='http://deadbeef:8081', user='******',
                                                    password='******')

        self.assertRaises(Exception, self.__sendSimpleRequest, client.new_request())