def api_introspection_statuses(): nodes = node_cache.get_node_list( marker=api_tools.marker_field(), limit=api_tools.limit_field(default=CONF.api_max_limit)) data = { 'introspection': [generate_introspection_status(node) for node in nodes] } return flask.json.jsonify(data)
def api_introspection_statuses(): utils.check_auth(flask.request) nodes = node_cache.get_node_list( marker=api_tools.marker_field(), limit=api_tools.limit_field(default=CONF.api_max_limit) ) data = { 'introspection': [generate_introspection_status(node) for node in nodes] } return flask.json.jsonify(data)
def test_limit_zero(self, get_mock): value = api_tools.limit_field() self.assertEqual(CONF.api_max_limit, value)
def test_limit_ok(self, get_mock): value = api_tools.limit_field() self.assertEqual(get_mock.return_value, value)