def __init__(self): self.overallstatus = None self.queryresponse = None self.data = None self.objjson = None self.queryhost = Config.getconfig('QUERY_HOST') self.queryapp = Config.getconfig('QUERY_app') self.protocol = Config.getconfig('QUERY_PROTOCOL') self.body = Config.getconfig('QUERY_BODY') self.method = Config.getconfig('QUERY_METHOD') self.headers = Config.getqueryheaders() self.dnsservers = self.getdnsservers()
def isrunwithjsonfile(self): # Load sample json as response from Query service if Config.getconfig('RUN_WITH_JSON_FILE') == 'yes': filename = Config.getconfig('TEST_JSON_FILE') f = open(filename) self.data = f.read()