Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ refactor test structure #86

Merged
merged 1 commit into from
Feb 24, 2024
Merged

Conversation

mingi3314
Copy link
Owner

@mingi3314 mingi3314 commented Feb 24, 2024


Generated summary (powered by Graphite)

TL;DR

This pull request introduces the ability to create new accounts via the API. It also includes a unique identifier for each account and updates the test files to reflect these changes.

What changed

  1. Imported UUID from the uuid module in pyrb/controllers/api/main.py and pyrb/models/account.py.
  2. Added new classes AccountCreateRequest and AccountCreateResponse to handle the creation of new accounts.
  3. Added a new POST route /accounts to create new accounts.
  4. Added a unique identifier id to the Account model.
  5. Renamed tests/test_controller.py to tests/controllers/test_cli.py.

How to test

  1. Pull the changes from this branch into your local environment.
  2. Run the application and use a tool like curl or Postman to send a POST request to /accounts with the required parameters (brokerage, app_key, secret_key).
  3. Check the response to ensure that a new account is created and a unique identifier is returned.
  4. Run the test suite to ensure all tests pass with the new changes.

Why make this change

This change allows users to create new accounts via the API, which is a crucial feature for any application dealing with user accounts. The unique identifier for each account ensures that each account can be easily identified and managed. The renaming of the test file is to maintain consistency in the project's file structure.

Copy link
Owner Author

mingi3314 commented Feb 24, 2024

Merge activity

  • Feb 24, 9:32 AM EST: @mingi3314 started a stack merge that includes this pull request via Graphite.
  • Feb 24, 9:33 AM EST: Graphite rebased this pull request as part of a merge.
  • Feb 24, 9:34 AM EST: @mingi3314 merged this pull request with Graphite.

Base automatically changed from 02-24-_API_ to main February 24, 2024 14:32
@mingi3314 mingi3314 force-pushed the 02-24-_refactor_test_structure branch from 15a02eb to 0dd52a6 Compare February 24, 2024 14:33
@mingi3314 mingi3314 merged commit 0ffbcf3 into main Feb 24, 2024
1 check passed
@mingi3314 mingi3314 deleted the 02-24-_refactor_test_structure branch February 24, 2024 14:34
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.

1 participant