-
Notifications
You must be signed in to change notification settings - Fork 41
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
semester and subsemester tests #536
Conversation
You need to run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull from FastAPI and update your commenting. Once I can see the tests are successfully running I will be good to approve!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to merge!
* 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]>
Wrote test cases for semester and subsemester endpoints
Issue