Skip to content

Commit

Permalink
Unit test for custom options
Browse files Browse the repository at this point in the history
  • Loading branch information
dcwatson committed May 31, 2022
1 parent 975c6ad commit fcffaf1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test_dj_database_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,12 @@ def test_mssqlms_parsing(self):
assert url["OPTIONS"]["driver"] == "ODBC Driver 13 for SQL Server"
assert "currentSchema" not in url["OPTIONS"]

def test_database_options(self):
url = "postgres://user:pass@host/db"
url = dj_database_url.parse(url, ATOMIC_REQUESTS=True, TEST={"NAME": "testdb"})
assert url["ATOMIC_REQUESTS"] is True
assert url["TEST"] == {"NAME": "testdb"}


if __name__ == "__main__":
unittest.main()

0 comments on commit fcffaf1

Please sign in to comment.