Verified Commit 059c115d authored by Власов Иван Юрьевич's avatar Власов Иван Юрьевич :rabbit2:
Browse files

Added base testing

parent 2d70eea0
No related merge requests found
Showing with 18 additions and 0 deletions
+18 -0
import pytest
from starlette.testclient import TestClient
from app import app
@pytest.fixture
def sti() -> TestClient:
""" Starlette TestClient Instance, wrapped in fixture """
return TestClient(app)
import httpx as httpx
from tests.fixtures.client import sti
def test_ping(sti):
resp: httpx.Response = sti.get("/ping")
print(resp.text)
data = resp.json()
assert data == {"ok": True, "data": {}}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment