Skip to content

Commit

Permalink
Added pytest for health endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
raikarn committed Aug 14, 2024
1 parent 55ef605 commit f3702e5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions backend/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import os
import sys

from fastapi.testclient import TestClient

from backend.main import app

sys.path.append(os.getcwd())


client = TestClient(app)
11 changes: 11 additions & 0 deletions backend/tests/api/test_health.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest
from tests import client


@pytest.mark.health
def test_check_health():
"""Checks if Aora is up and running"""

get_response = client.get("/health")
assert get_response.status_code == 200
assert get_response.json()["status"] == "Active"

0 comments on commit f3702e5

Please sign in to comment.