Skip to content

Test

test_app()

Test Application Root

This function tests the root endpoint of the application to ensure it returns the expected JSON response.

Source code in src/user_service/test_main.py
def test_app():
    """
    Test Application Root

    This function tests the root endpoint of the application to ensure it returns the expected JSON response.
    """
    assert tmp_client.get("/").json() == {"msg": "user_service"}

test_healthcheck()

Test Health Check

This function tests the health check endpoint to ensure the server is running properly.

Source code in src/user_service/test_main.py
def test_healthcheck():
    """
    Test Health Check

    This function tests the health check endpoint to ensure the server is running properly.
    """
    assert tmp_client.get("/healthcheck").status_code == 200