-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <ljhaining@gmail.com> Co-authored-by: Liam Haining <12472949+lhain08@users.noreply.github.com>
- Loading branch information
1 parent
b610a55
commit 9da2387
Showing
8 changed files
with
49 additions
and
43 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
from pydantic import BaseModel | ||
from typing import Optional | ||
|
||
|
||
class SessionPydantic(BaseModel): | ||
email: str | ||
password: str | ||
|
||
class SessionDeletePydantic(BaseModel): | ||
sessionID: str | ||
|
||
class SubsemesterPydantic(BaseModel): | ||
semester: Optional[str] = None |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
export DB_HOST=${DB_HOST:-localhost} | ||
export DB_USER=${DB_USER:-yacs} | ||
export DB_PASS=${DB_PASS:-easy_dev_pass} | ||
export DB_NAME=${DB_NAME:-yacs} | ||
export DB_PORT=${DB_PORT:-5432} | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
export TEST_APP_DIR=$SCRIPT_DIR/../ | ||
|
||
#pip3 install -r $TEST_APP_DIR/requirements.txt | ||
python3 -m pytest -s -m "testclient and not incompletedependency" "${SCRIPT_DIR}" | ||
python3 -m pytest -s -m "testclient and not incompletedependency" "${SCRIPT_DIR}" |
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
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