Skip to content

Instantly share code, notes, and snippets.

@mehd-io
Created May 24, 2022 18:25
Show Gist options
  • Save mehd-io/fa4fdd161c2409824037c82f7396a940 to your computer and use it in GitHub Desktop.
Save mehd-io/fa4fdd161c2409824037c82f7396a940 to your computer and use it in GitHub Desktop.
medium-tftest-api-hello
import json
import pytest
from google.auth.transport.requests import AuthorizedSession
from .cloud_run_client import request_wrapper
@pytest.mark.integration
def test_health_check(auth_session: AuthorizedSession):
params = {"auth_session": auth_session, "method": "GET", "route": "/"}
response = request_wrapper(**params)
assert response.ok
assert json.loads(response.text)["message"] == "Hello World"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment