Skip to content

Commit

Permalink
include test for getting version
Browse files Browse the repository at this point in the history
Signed-off-by: Huong Nguyen <[email protected]>
  • Loading branch information
Huong Nguyen committed Jan 17, 2025
1 parent 54f512c commit 2aae1dc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions package/tests/test_api/test_rest/test_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,16 @@ def test_metadata(
mock_get_metadata_response.assert_called_once()
assert response.status_code == expected_status_code
assert response.json() == expected_response

def test_version(client):
response = client.get("/api/version")
assert response.status_code == 200

json_response = response.json()
assert "installed" in json_response
assert "isOutdated" in json_response
assert "latest" in json_response

assert isinstance(json_response["installed"], str)
assert isinstance(json_response["isOutdated"], bool)
assert isinstance(json_response["latest"], str)

0 comments on commit 2aae1dc

Please sign in to comment.