-
Notifications
You must be signed in to change notification settings - Fork 26
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
use quote_plus instead of quote #122
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e2fe26f
use quote_plus instead of quote
ranchodeluxe 7da4e2a
Merge branch 'main' into patch-1
69d497c
Merge branch 'main' into patch-1
ranchodeluxe e457fd9
make it fail
d10614a
Merge branch 'patch-1' of github.com:ranchodeluxe/stac-fastapi-pgstac…
485d2f0
fix test
vincentsarago a085a57
one more quote
vincentsarago File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
import os | ||
import time | ||
from typing import Callable, Dict | ||
from urllib.parse import quote_plus as quote | ||
from urllib.parse import urljoin | ||
|
||
import asyncpg | ||
|
@@ -53,11 +54,9 @@ def database(postgresql_proc): | |
port=postgresql_proc.port, | ||
dbname="pgstactestdb", | ||
version=postgresql_proc.version, | ||
password="secret", | ||
password="a2Vw:yk=)CdSis[fek]tW=/o", | ||
) as jan: | ||
connection = ( | ||
f"postgresql://{jan.user}:{jan.password}@{jan.host}:{jan.port}/{jan.dbname}" | ||
) | ||
connection = f"postgresql://{jan.user}:{quote(jan.password)}@{jan.host}:{jan.port}/{jan.dbname}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in the test we also needed to |
||
with PgstacDB(dsn=connection) as db: | ||
migrator = Migrate(db) | ||
version = migrator.run_migration() | ||
|
@@ -68,7 +67,7 @@ def database(postgresql_proc): | |
|
||
@pytest.fixture(autouse=True) | ||
async def pgstac(database): | ||
connection = f"postgresql://{database.user}:{database.password}@{database.host}:{database.port}/{database.dbname}" | ||
connection = f"postgresql://{database.user}:{quote(database.password)}@{database.host}:{database.port}/{database.dbname}" | ||
yield | ||
conn = await asyncpg.connect(dsn=connection) | ||
await conn.execute( | ||
|
@@ -99,7 +98,6 @@ async def pgstac(database): | |
) | ||
def api_client(request, database): | ||
hydrate, prefix, response_model = request.param | ||
|
||
api_settings = Settings( | ||
postgres_user=database.user, | ||
postgres_pass=database.password, | ||
|
Oops, something went wrong.
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.
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.
re-added this after confirming locally that the test were failing!