-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #182 from grillazz/179-reflect-latest-and-greatest…
…-fastapi-improvements 179 reflect latest and greatest fastapi improvements
- Loading branch information
Showing
10 changed files
with
26 additions
and
12 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
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
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ services: | |
- "8080:8080" | ||
depends_on: | ||
- db | ||
- redis | ||
- inmemory | ||
|
||
db: | ||
container_name: fsap_db | ||
|
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,11 +1,11 @@ | ||
-- DROP DATABASE IF EXISTS devdb; | ||
-- CREATE DATABASE devdb; | ||
\connect devdb; | ||
CREATE SCHEMA shakespeare; | ||
CREATE SCHEMA happy_hog; | ||
CREATE SCHEMA scheduler; | ||
|
||
DROP DATABASE IF EXISTS testdb; | ||
CREATE DATABASE testdb; | ||
\connect testdb; | ||
CREATE SCHEMA shakespeare; | ||
CREATE SCHEMA happy_hog; | ||
CREATE SCHEMA scheduler; |
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,5 +1,3 @@ | ||
version: '3.8' | ||
|
||
services: | ||
app: | ||
environment: | ||
|
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 |
---|---|---|
|
@@ -38,7 +38,11 @@ async def test_add_user(client: AsyncClient): | |
# TODO: parametrize test with diff urls including 404 and 401 | ||
async def test_get_token(client: AsyncClient): | ||
payload = {"email": "[email protected]", "password": "s1lly"} | ||
response = await client.post("/user/token", json=payload) | ||
response = await client.post( | ||
"/user/token", | ||
data=payload, | ||
headers={"Content-Type": "application/x-www-form-urlencoded"}, | ||
) | ||
assert response.status_code == status.HTTP_201_CREATED | ||
claimset = jwt.decode( | ||
response.json()["access_token"], options={"verify_signature": False} | ||
|