From 267212bbe5460eb83637b0ebb809b9a0db106032 Mon Sep 17 00:00:00 2001 From: Alyssa Dai Date: Wed, 19 Jun 2024 22:44:09 -0400 Subject: [PATCH] test contents of root endpoint --- tests/test_attributes.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_attributes.py b/tests/test_attributes.py index 056e9e3..9082b34 100644 --- a/tests/test_attributes.py +++ b/tests/test_attributes.py @@ -2,6 +2,16 @@ from fastapi import status +def test_root(test_app, set_valid_test_federation_nodes): + """Given a GET request to the root endpoint, Check for 200 status and expected content.""" + + response = test_app.get("/") + + assert response.status_code == status.HTTP_200_OK + assert "Welcome to the Neurobagel REST API" in response.text + assert 'documentation' in response.text + + def test_partially_failed_terms_fetching_handled_gracefully( test_app, monkeypatch, set_valid_test_federation_nodes, caplog ):