mirror of
https://github.com/jazzband/dj-database-url.git
synced 2026-03-16 22:20:24 +00:00
Make test_options paramter type None over Dict
Has the potential in the future to be a bug. {} are mutable
in the scope of kwargs of a function.
This commit is contained in:
parent
b416fa416f
commit
3c1a39b437
1 changed files with 4 additions and 2 deletions
|
|
@ -71,10 +71,9 @@ def parse(
|
|||
conn_max_age=0,
|
||||
conn_health_checks=False,
|
||||
ssl_require=False,
|
||||
test_options={},
|
||||
test_options=None,
|
||||
):
|
||||
"""Parses a database URL."""
|
||||
|
||||
if url == "sqlite://:memory:":
|
||||
# this is a special case, because if we pass this URL into
|
||||
# urlparse, urlparse will choke trying to interpret "memory"
|
||||
|
|
@ -85,6 +84,9 @@ def parse(
|
|||
# otherwise parse the url as normal
|
||||
parsed_config = {}
|
||||
|
||||
if test_options is None:
|
||||
test_options = {}
|
||||
|
||||
url = urlparse.urlsplit(url)
|
||||
|
||||
# Split query strings from path.
|
||||
|
|
|
|||
Loading…
Reference in a new issue