-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix parameter name, user vs username (#13)
- Loading branch information
1 parent
654b1b6
commit 11eb8a4
Showing
3 changed files
with
18 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
[project] | ||
# https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/ | ||
name = 'questdb-connect' | ||
version = '1.0.11' # Standalone production version (with engine) | ||
#version = '0.0.104' # testing version | ||
version = '1.0.12' # Standalone production version (with engine) | ||
# version = '0.0.105' # testing version | ||
authors = [{ name = 'questdb.io', email = '[email protected]' }] | ||
description = "SqlAlchemy library" | ||
readme = "README.md" | ||
|
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import pytest | ||
from _pytest.outcomes import fail | ||
from psycopg2 import OperationalError | ||
from sqlalchemy import create_engine | ||
|
||
|
||
def test_user(test_engine, test_model): | ||
engine = create_engine("questdb://admin:quest@localhost:8812/qdb") | ||
engine.connect() | ||
|
||
engine = create_engine("questdb://user1:quest@localhost:8812/qdb") | ||
with pytest.raises(OperationalError) as exc_info: | ||
engine.connect() | ||
if not str(exc_info.value).__contains__("ERROR: invalid username/password"): | ||
fail() |