-
-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: parse options with numerical values as int (#225)
* fix: parse options with numerical values as int fixes #222 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
9b0f325
commit 13be1aa
Showing
2 changed files
with
11 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -585,6 +585,13 @@ def test_ssl_require(self): | |
url = dj_database_url.config(ssl_require=True) | ||
assert url["OPTIONS"] == {'sslmode': 'require'} | ||
|
||
def test_options_int_values(self): | ||
"""Ensure that options with integer values are parsed correctly.""" | ||
url = dj_database_url.parse( | ||
"mysql://user:[email protected]:15036/db?connect_timout=3" | ||
) | ||
assert url["OPTIONS"] == {'connect_timout': 3} | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |