Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Title: Add Seeding Endpoint for Dummy User Data
Description
Description
This pull request introduces a new endpoint, /seed-users, to facilitate the addition of dummy user data into the players table during development and testing. This endpoint allows developers to quickly populate the database with fake users, enabling easier testing of features that rely on user data.
Related Issue (Link to issue ticket)
(#1037)
Motivation and Context
During development and testing, it is often necessary to have a populated database with realistic user data. Manually creating users through the standard registration process can be time-consuming. This seeding endpoint streamlines this process, allowing developers to quickly populate the database with dummy users for testing purposes.
How Has This Been Tested?
The new endpoint has been tested using with swagger fastapi docs and postman. The following steps were taken:
A POST request was sent to /seed with a JSON body specifying the number of users to seed.
The response was verified to ensure a successful status code (200) and a message indicating the number of users created.
The users table in the database was checked to confirm the insertion of the specified number of dummy users.
The endpoint was tested with varying numbers of users to ensure it functions correctly across different scenarios.
Error handling was tested by sending invalid data, ensuring the endpoint returns appropriate error messages.
Pytest for the the endpoint checked out
Screenshots (if appropriate - Postman, etc):
with postman
Expected result
Types of changes
Checklist: