Now I am going to add a test route to my project for creating and adding fake data for testing only for example adding fake users, posts and credit cards, etc.
Fake user data adding:
- The route is "/test/add_user " and its method is post.
- Arguments required username and password.
- Password cannot be stored in the database directly, so I hashed it using the python bcrypt module.
- After that check if the user in the database already exists, return some json, and if not, write the new user data in the database and the return account created in json format.