Skip to content

Commit

Permalink
fix: numerical values in options as int
Browse files Browse the repository at this point in the history
  • Loading branch information
estahn committed Aug 15, 2023
1 parent 5547523 commit f956151
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 43 deletions.
46 changes: 6 additions & 40 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ include = [

[tool.poetry.dependencies]
python = "^3.8"
dj-database-url = "^1.2.0"
dj-database-url = "^2.1.0"
pydantic = {extras = ["dotenv"], version = "^1.8.1"}

[tool.poetry.dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_db_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class DatabaseConfig(BaseDBConfig):
def test_dsn_extra_params():
class DatabaseConfig(BaseDBConfig):
default = Field(
default="postgres://user:password@hostname:5432/dbname",
default="postgres://user:password@hostname:5432/dbname?connect_timeout=10",
conn_max_age=60,
ssl_require=True,
conn_health_checks=True,
Expand All @@ -50,7 +50,7 @@ class DatabaseConfig(BaseDBConfig):
'ENGINE': 'my.custom.backend',
'HOST': 'hostname',
'NAME': 'dbname',
'OPTIONS': {'sslmode': 'require'},
'OPTIONS': {'connect_timeout': 10, 'sslmode': 'require'},
'PASSWORD': 'password',
'PORT': 5432,
'USER': 'user',
Expand Down

0 comments on commit f956151

Please sign in to comment.