class_docstr: Tests the server's response on experiments/
class_docstr_tok: ["Tests","the","server","'s","response","on","experiments\/"]
docstr: Tests that the API return the latest versions of each experiment
docstr_tok: ["Tests","that","the","API","return","the","latest","versions","of","each","experiment"]
code: def test_latest_versions(self, client, ephemeral_storage):
      """Tests that the API return the latest versions of each experiment"""
      expected = [
          {"name": "a", "version": 3},
          {"name": "b", "version": 1},
      ]
  
      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_experiment(storage, name="b", version=1, _id=4)
  
      response = client.simulate_get("/experiments")
  
      assert response.json == expected
      assert response.status == "200 OK"
  
imports: import copy
  import datetime
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 3 for calling the TestCollection obj's underlying member method code with example usage: obj.test_latest_versions(client, ephemeral_storage) without return types