class_docstr: Tests the server's response to benchmarks/:name
class_docstr_tok: ["Tests","the","server","'s","response","to","benchmarks\/",":","name"]
docstr: Tests that the benchmark returned is following the specification
docstr_tok: ["Tests","that","the","benchmark","returned","is","following","the","specification"]
code: def test_benchmark_specification(self, client_with_benchmark):
      """Tests that the benchmark returned is following the specification"""
      response = client_with_benchmark.simulate_get(
          "/benchmarks/branin_baselines"
      )
  
      assert response.status == "200 OK"
  
      assert response.json["name"] == "branin_baselines"
      assert response.json["algorithms"] == ["gridsearch", "random"]
      assert response.json["tasks"] == [{"Branin": {"max_trials": 10}}]
      assert response.json["assessments"] == [
          {"AverageResult": {"repetitions": 2}}
      ]
      assert "AverageResult" in response.json["analysis"]
      assert "Branin" in response.json["analysis"]["AverageResult"]
      _assert_plot_contains(
          "gridsearch",
          response.json["analysis"]["AverageResult"]["Branin"][
              "regrets"
          ],
      )
      _assert_plot_contains(
          "random",
          response.json["analysis"]["AverageResult"]["Branin"][
              "regrets"
          ],
      )
  
imports: import json
  import os
  import pytest
  from falcon import testing
  from orion.benchmark.assessment import AverageRank, AverageResult
  from orion.benchmark.benchmark_client import get_or_create_benchmark
  from orion.benchmark.task import Branin, CarromTable, EggHolder
  from orion.serving.webapi import WebApi
  from orion.storage.base import setup_storage
label_desc: Use image node_id 2 for calling the TestItem obj's underlying member method code with example usage: obj.test_benchmark_specification(client_with_benchmark) without return types