-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fast api course #552
Merged
Merged
Fast api course #552
Conversation
This file contains 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
…n in the success cases
lhain08
commented
Mar 15, 2022
Change ways of writing to examine whether the course is successfully delete or not
lhain08
added a commit
that referenced
this pull request
Apr 5, 2022
* Added example pytests * fastapi testing framework * added additional notes for how to test * additional notes * Pushed Project Plan * added branch names * updated pytest dependencies * update requirements * Fast api session (#523) * update requirements * added session test cases * Create test_user_course.py * Revert "Create test_user_course.py" This reverts commit 841505d. * updated client to use sessions * updated the pytests to use conftest.py instead of fixtures.py * Finished first draft of tests for class and department endpoints (#533) * Finished first draft of tests for class and department endpoints * Fixed issues with the first draft tests * made recommended changes and added note to class endpoint check about admin non-public semesters * cleared __init__ * Fast api update session (#539) * preliminary fastapi converting * converted to FastAPI * implemented fastapi-cache * removed backup * removed no longer needed commented code * removed no longer needed commented code * converted pytests to use FastAPI TestClient, added automation script * moved markers from conftest to .ini * added documentation for how to update endpoints and added CI for running tests * commented out tests that need updating * added missing requirement * set env variables * automated database cleaning * updated old mock_cache to work for fastapi-cache so old pytests work * uncommented CI step for old pytests * semester and subsemester tests (#536) * semester and subsemester tests * updated comments * Fast api course and event (#537) * Create test_user_course.py * Update test_user_course.py * Update failure case and minor change on success post * Minor changes * Debugging json on line 26 * Passed post success and failure for user/course * Clear comments for pr requirements * Added not authorized test and followed pr requirements * removed prints * Updated delete to actually delete user and not just disable the account * updated delete to remove all user's course selections when deleting user account * Fast api semester info + Default Semester (#545) * Finished Semester Info Endpoint * Finished Default Semester Endpoint * Fast api user get and put (#540) * added session test cases * test * test user-get success * test user get false * test user put * Fixed test client sessions * delete cookie, using session * delete unrelated comments * add post_user * add test_get_user_after_session_closed * test put user after session closed * remove unrelated code * remove print Co-authored-by: Liam Haining <[email protected]> * put directory in quotes to avoid bugs with spaces in directory * replaced missing quotation * Fast api user post and delete (#541) * Create user.py * Delete user.py * Create flasktest.py * passed user post test * test case for delete * all test cases * change based on comments * Update .gitignore * Delete yacs.n.iml * Delete workspace.xml * Delete modules.xml * Delete vcs.xml * Delete runConfigurations.xml * removed .idea/.gitignore Co-authored-by: Liam Haining <[email protected]> * Fast api conversion department class (#551) * First conversion draft * fixed mistakes Co-authored-by: canghiskhan <calvinang@icloud> * Fast api course (#552) * user_course_get_success * create a user course delete success function * update the delete failure function and add code to log out the session in the success cases * add failure cases for get and delete * add failure cases for get and delete * Update test_user_course_delete.py Change ways of writing to examine whether the course is successfully delete or not * delete trivial spaces and all the prints Co-authored-by: Xies3 <[email protected]> * wrote test cases for default semester set and map date range (#554) Co-authored-by: Sachin Khanijow <[email protected]> * added Depends and Optionals * Fast api conversion default semester (#556) * finished app.py * updated tests * Fast api conversion subsemester (#553) * rc/api/tests/test.sh :wq :wq � * revert env variable * updated endpoint tests * updated second endpoint test * corrected fastapi import to fastapi.testclient * debig app.py * pydantic -> str * attempt 1 updating endpoint subsemester with dependency injection, and test subsemester with Optional param * updated app.py and api_models.py for depends * fixed testclient import * added pytest mark to other tests * refixed import after I overwrote it * refixed import after I overwrote it * accidentally changed connection.py * cleaning up unnecessary imports and comments Co-authored-by: Liam Haining <[email protected]> Co-authored-by: Liam Haining <[email protected]> * Fast api conversion course and event (#555) * Create test_user_course.py * Update test_user_course.py * Update failure case and minor change on success post * Minor changes * Debugging json on line 26 * Passed post success and failure for user/course * Clear comments for pr requirements * Added not authorized test and followed pr requirements * Update endpoints step 1 * Update in pydantic model * Status to Status_code * Change api naming conversion to FastAPI * Debugging pytest * Fixed Post success and post failure pytest method * Change api_model datatype to str * newest update * Fixed the 422 Issue by removing user_id parameter * Undo some changes Co-authored-by: Liam Haining <[email protected]> * Fastapi conversion user post delete (#558) * add user model * API conversion Co-authored-by: Liam Haining <[email protected]> * removed incomplete dependencies * removed incomplete dependencies * removed incomplete dependencies * dockerizing tests * fixed naming conflicts * Fast api conversion user get and put (#560) * some brief changes * test * add to api_models * change some fastapi tests * try chaning to fastapi * current progress * request.session * not in request.session * request: Request * status_code * test bug * change test client back * remove unrelated comment * Fast api conversion defaultsemesterset (#563) * app.py * fix? * fixed tests Co-authored-by: Sachin Khanijow <[email protected]> * removed print * user course fix * Fast api conversion course (#564) * modify the api user course delete function * fastapi-conversion-course-get-and-delete * arg for remove_selection * merged logically similar test files * merged logically similar test files * fix * removed extra dependencies * bug fixes * codefactor is picky * updated flask related things to fastapi * fixed start script * removing unused code Co-authored-by: YuetingLiao <[email protected]> Co-authored-by: canghiskhan <[email protected]> Co-authored-by: PhoenixTamaoki <[email protected]> Co-authored-by: navyaa-24 <[email protected]> Co-authored-by: hhdtc <[email protected]> Co-authored-by: franchen28 <[email protected]> Co-authored-by: canghiskhan <calvinang@icloud> Co-authored-by: Xies3 <[email protected]> Co-authored-by: vancouver02 <[email protected]> Co-authored-by: Sachin Khanijow <[email protected]> Co-authored-by: Sachin Khanijow <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue
Note which issue number(s) this Pull Request closes. All pull requests should close an issue, if one does not exists, make one. This helps us plan and discuss before we decide on implementation
Example:
Database Changes/Migrations
If you added/modified a table, notify people of schema change here
Example:
Test Modifications
Note added unit/integration tests: (all backend changes should contain unit/integration tests with pytest)
Example:
Test Procedure
Show procedure to test functionality with a clear procedure
Example:
Photos
Show before and after, capture screenshot/gif of finished feature/bug
Additional Info
More info that would help people review your change