Skip to content

Commit

Permalink
List cases API call does indeed list cases #2714
Browse files Browse the repository at this point in the history
  • Loading branch information
iamleeg committed Jun 20, 2022
1 parent 6b405d3 commit 0d8430a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions data-serving/reusable-data-service/tests/test_case_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,15 @@ def test_list_cases_should_return_200_OK(app_context):
(response, status) = controller.list_cases()
assert status == 200
assert response.json == []


def test_list_cases_should_list_the_cases(app_context):
store = MemoryStore()
controller = CaseController(store)
with open("./tests/data/case.minimal.json", "r") as minimal_file:
case = Case.from_json(minimal_file.read())
store.put_case("foo", case)
store.put_case("bar", case)
(response, status) = controller.list_cases()
assert status == 200
assert len(response.json) == 2

0 comments on commit 0d8430a

Please sign in to comment.