FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use faker for tests by ebreton · Pull Request #30 · fastapi/full-stack-fastapi-template · GitHub

Use faker for tests - #30

Closed
ebreton wants to merge 8 commits into
fastapi:masterfrom
ebreton:feature-use-faker-for-tests
Closed

Use faker for tests#30
ebreton wants to merge 8 commits into
fastapi:masterfrom
ebreton:feature-use-faker-for-tests

Conversation

ebreton commented May 20, 2019

Copy link
Copy Markdown
Contributor

Because tests should be first citizens pieces of code... they deserve proper random (faked) data 🎒

Faker is a new dependency, but only for tests (not included in backend dockerfile)

Copy link
Copy Markdown
Member

Thanks!

In fact, I initially used Faker (for the Flask version), but as currently the DB gets polluted with tests that are not removed afterwards, I started getting collisions frequently. And I realized that I didn't need real data, just random strings that I could check.

Let's leave this on standby until I update the tests to use Starlette's TestClient, and we can solve automatic rollbacks in tests.

ebreton commented May 21, 2019

Copy link
Copy Markdown
Contributor Author

Yes, sounds good. I will create another PR in due time 👍

ebreton closed this May 21, 2019

Copy link
Copy Markdown
Member

Thanks!

alejsdev added a commit that referenced this pull request Dec 19, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL