Beispiel #1
0
    def api_reachable(self):
        reachable, response = util.website_reachable(self.API_BASE)
        if not reachable:
            return False
            
        try:
            content = response.readline()
            content = json.loads(content)
            if 'message' in content and content['message'] == 'hello_world':
                return True
        except ValueError as err:
            pass

        return False
Beispiel #2
0
    def api_reachable(self):
        reachable, response = util.website_reachable(self.API_BASE)
        if not reachable:
            return False

        try:
            content = response.readline()
            content = json.loads(content)
            if 'message' in content and content['message'] == 'hello_world':
                return True
        except ValueError as err:
            pass

        return False