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)
def test_sendRestBadServer(self): client = OpalClient.buildWithAuthentication(server='http://deadbeef:8080', user='******', password='******') self.assertRaises(Exception, self.__sendSimpleRequest, client.new_request())
def test_sendRestBadCredentials(self): client = OpalClient.buildWithAuthentication(server="%s:%s" % (self.SERVER, self.PORT), user='******', password='******') self.assertRaises(Exception, self.__sendSimpleRequest, client.new_request())
def __init__(self, server, user, password, verbose): self.client = OpalClient.buildWithAuthentication(server=server, user=user, password=password) self.verbose = verbose