Skip to content

Commit 29885b9

Browse files
committed
add tests to readme
1 parent fdc2b92 commit 29885b9

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,15 @@ poetry run alembic upgrade head
151151

152152
___
153153
## Testing
154-
TODO
154+
While in the tests folder, create your test file with the name "test_{object}.py", replacing object with what you're testing
155+
```sh
156+
touch test_items.py
157+
```
155158

159+
Create your tests (you may want to copy the structure in test_user.py), then run:
160+
```sh
161+
poetry run python -m pytest
162+
```
156163
___
157164
# Other stuff
158165
## Contributing
@@ -164,7 +171,10 @@ ___
164171
6. Create a new Pull Request
165172

166173
## References
167-
TODO
174+
This project was inspired by a few projects, it's based on them with things changed to the way I like (and pydantic, sqlalchemy updated)
175+
* [`Full Stack FastAPI and PostgreSQL`](https://github.com/tiangolo/full-stack-fastapi-postgresql) by @tiangolo himself
176+
* [`FastAPI Microservices`](https://github.com/Kludex/fastapi-microservices) by @kludex which heavily inspired this boilerplate
177+
* [Async Web API with FastAPI + SQLAlchemy 2.0](https://github.com/rhoboro/async-fastapi-sqlalchemy)
168178

169179
## License
170180
[`MIT`](LICENSE.md)

src/tests/test_user.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
from typing import List
21
from fastapi.testclient import TestClient
32
from decouple import config
43

54
from src.app.main import app
65
from tests.helper import _get_token
7-
from app.schemas.user import UserCreate, UserRead, UserUpdate
86

97
test_name = config("TEST_NAME")
108
test_username = config("TEST_USERNAME")

0 commit comments

Comments
 (0)