123456789101112131415161718 |
- #!/usr/bin/env python3
- import pytest
- from starlette.testclient import TestClient
- import json
-
- from pyheatpump.heatpump import app
-
-
- def test_get_(set_test_db):
- c = TestClient(app)
- r = c.get('/')
- assert r.status_code == 200
-
- resp = r.content.decode()
- assert type(resp) == str
-
- d_resp = json.loads(resp)
- assert type(d_resp) == dict
|