16 lines
584 B
Python
16 lines
584 B
Python
from fastapi.testclient import TestClient
|
|
|
|
from treetrail.application import app
|
|
|
|
client = TestClient(app)
|
|
|
|
|
|
def test_read_main():
|
|
with TestClient(app) as client:
|
|
response = client.get("/treetrail/v1/bootstrap")
|
|
assert response.status_code == 200
|
|
json = response.json()
|
|
assert set(json) == {'client', 'server', 'user', 'map', 'baseMapStyles', 'app'}
|
|
assert json['user'] is None
|
|
assert set(json['map']) == {'bearing', 'lat', 'background', 'lng', 'pitch', 'zoom'}
|
|
assert set(json['baseMapStyles']) == {'external', 'embedded'}
|