コード例 #1
0
ファイル: testRestCall.py プロジェクト: thehyve/opal
 def test_sendRest(self):
     try:
         client = OpalClient.buildWithAuthentication(server="%s:%s" % (self.SERVER, self.PORT), user='******',
                                                     password='******')
         self.__sendSimpleRequest(client.new_request())
     except Exception, e:
         self.fail(e)
コード例 #2
0
ファイル: testRestCall.py プロジェクト: thehyve/opal
    def test_sendRestBadServer(self):
        client = OpalClient.buildWithAuthentication(server='http://deadbeef:8080', user='******',
                                                    password='******')

        self.assertRaises(Exception, self.__sendSimpleRequest, client.new_request())
コード例 #3
0
ファイル: testRestCall.py プロジェクト: thehyve/opal
    def test_sendRestBadCredentials(self):
        client = OpalClient.buildWithAuthentication(server="%s:%s" % (self.SERVER, self.PORT), user='******',
                                                    password='******')

        self.assertRaises(Exception, self.__sendSimpleRequest, client.new_request())
コード例 #4
0
 def __init__(self, server, user, password, verbose):
     self.client = OpalClient.buildWithAuthentication(server=server, user=user, password=password)
     self.verbose = verbose