Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fransy26 committed Nov 29, 2023
1 parent 87db79f commit 69648bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions test/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def db_config():
"OPTIONS": {},
"AUTOCOMMIT": True,
"CONN_MAX_AGE": None,
"CONN_HEALTH_CHECKS": False,
"TIME_ZONE": None,
}

Expand Down Expand Up @@ -102,6 +103,7 @@ def test_DatabaseWrapper_validate_connection_handles_closed_connections(
**db_config,
"OPTIONS": {"VALIDATE_CONNECTION": True, "VALIDATION_INTERVAL": 0},
"CONN_MAX_AGE": 0, # this will make close_if_unusable_or_obsolete close the connection
"CONN_HEALTH_CHECKS": False,
})
db.connect()
db.validate_connection()
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ deps =
pytest-django
pytest-mock
freezegun
pyodbc
pyodbc<5

dj3: Django>=3.2.0,<4
dj4: Django>=4,<5

commands =
pytest -v \
pytest -v -x \
--cov-report term-missing \
--cov-fail-under '70' \
--no-cov-on-fail \
Expand Down

0 comments on commit 69648bd

Please sign in to comment.