Initial commit
This commit is contained in:
commit
f4cf78603a
25 changed files with 2895 additions and 0 deletions
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
16
tests/basic.py
Normal file
16
tests/basic.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
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'}
|
Loading…
Add table
Add a link
Reference in a new issue