Created
February 10, 2021 19:45
-
-
Save MwinyiMoha/ede38a248dc2957e06fdcc8fd4400010 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastapi.testclient import TestClient | |
from app.main import app | |
client = TestClient(app) | |
def test_root(): | |
response = client.get('/') | |
data = response.json() | |
assert response.status_code == 200 | |
assert data['service'] == 'Hello World' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment