class_docstr: Test the server's response to experiments/status/:name
class_docstr_tok: ["Test","the","server","'s","response","to","experiments\/status\/",":","name"]
docstr: Tests that the latest experiment is returned when no version parameter exists
docstr_tok: ["Tests","that","the","latest","experiment","is","returned","when","no","version","parameter","exists"]
code: def test_default_is_latest_version(self, client, ephemeral_storage):
      """Tests that the latest experiment is returned when no version parameter exists"""
  
      storage = ephemeral_storage.storage
  
      _add_experiment(storage, name="a", version=1, _id=1)
      _add_experiment(storage, name="a", version=3, _id=2)
      _add_experiment(storage, name="a", version=2, _id=3)
      _add_trial(
          storage, experiment=1, id_override="ae8", status="completed"
      )
      _add_trial(
          storage, experiment=2, id_override="ae8", status="reserved"
      )
      _add_trial(
          storage, experiment=3, id_override="ae8", status="interrupted"
      )
  
      response = client.simulate_get("/experiments/status/a")
      response1 = client.simulate_get("/experiments/status/a?version=1")
      response3 = client.simulate_get("/experiments/status/a?version=3")
  
      assert response.status == "200 OK"
      assert response1.status == "200 OK"
      assert response3.status == "200 OK"
  
      assert response.json == {
          "trials_completed": 0,
          "best_trials_id": None,
          "best_evaluation": None,
          "start_time": "0001-01-01 00:00:00",
          "finish_time": "0001-01-01 00:00:00",
          "max_trials": 10,
          "nb_trials": 1,
          "progress": 0.0,
          "trial_status_count": {"reserved": 1},
          "elapsed_time": "23:59:50",
          "sum_of_trials_time": "23:59:50",
          "eta": "infinite",
          "eta_milliseconds": None,
      }
  
      assert response.json == response3.json
      assert response.json != response1.json
  
imports: import copy
  import datetime
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 4 for calling the TestStats obj's underlying member method code with example usage: obj.test_default_is_latest_version(client, ephemeral_storage) without return types