Skip to content

Commit 7ce5f3e

Browse files
committed
added testing
1 parent 9458589 commit 7ce5f3e

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

.circleci/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ commands:
3636
- run:
3737
name: Create ENV file
3838
command: env > .env
39+
- run:
40+
name: Run Tests
41+
command: pytest
3942
package-lambda:
4043
description: "Packages the Python into a zip file."
4144
steps:

app/tests/__init__.py

Whitespace-only changes.

app/tests/test_main.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from fastapi.testclient import TestClient
2+
3+
from app.main import app
4+
5+
client = TestClient(app)
6+
7+
8+
def test_read_main():
9+
response = client.get("/")
10+
assert response.status_code == 200
11+
assert response.json() == {"message": "Secret Key: this is my secret key"}

requirements.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ aiofiles==0.5.0
22
aniso8601==7.0.0
33
async-exit-stack==1.0.1
44
async-generator==1.10
5+
attrs==19.3.0
56
certifi==2020.6.20
67
chardet==3.0.4
78
click==7.1.2
@@ -14,23 +15,33 @@ graphql-relay==2.0.1
1415
h11==0.9.0
1516
httptools==0.1.1
1617
idna==2.10
18+
importlib-metadata==1.7.0
19+
iniconfig==1.0.1
1720
itsdangerous==1.1.0
1821
Jinja2==2.11.2
1922
mangum==0.9.2
2023
MarkupSafe==1.1.1
24+
more-itertools==8.4.0
2125
orjson==3.3.0
26+
packaging==20.4
27+
pluggy==0.13.1
2228
promise==2.3
29+
py==1.9.0
2330
pydantic==1.6.1
31+
pyparsing==2.4.7
32+
pytest==6.0.1
2433
python-dotenv==0.14.0
2534
python-multipart==0.0.5
2635
PyYAML==5.3.1
2736
requests==2.24.0
2837
Rx==1.6.1
2938
six==1.15.0
3039
starlette==0.13.6
40+
toml==0.10.1
3141
typing-extensions==3.7.4.2
3242
ujson==3.0.0
3343
urllib3==1.25.10
3444
uvicorn==0.11.6
3545
uvloop==0.14.0
3646
websockets==8.1
47+
zipp==3.1.0

0 commit comments

Comments
 (0)