Skip to content

Commit cdb5d64

Browse files
committed
Update tests
1 parent 15ac40b commit cdb5d64

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_dj_database_url.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,14 @@ def test_memory_sqlite_url(self) -> None:
218218
assert url["ENGINE"] == "django.db.backends.sqlite3"
219219
assert url["NAME"] == ":memory:"
220220

221-
def test_sqlite_relative_url(self):
221+
def test_sqlite_relative_url(self) -> None:
222222
url = "sqlite:///db.sqlite3"
223223
config = dj_database_url.parse(url)
224224

225225
assert config["ENGINE"] == "django.db.backends.sqlite3"
226226
assert config["NAME"] == "db.sqlite3"
227227

228-
def test_sqlite_absolute_url(self):
228+
def test_sqlite_absolute_url(self) -> None:
229229
# 4 slashes are needed:
230230
# two are part of scheme
231231
# one separates host:port from path
@@ -638,29 +638,29 @@ def test_no_env_variable(self) -> None:
638638
'WARNING:root:No DATABASE_URL environment variable set, and so no databases setup'
639639
], cm.output
640640

641-
def test_credentials_unquoted__raise_value_error(self):
641+
def test_credentials_unquoted__raise_value_error(self) -> None:
642642
expected_message = (
643643
"This string is not a valid url, possibly because some of its parts "
644644
r"is not properly urllib.parse.quote()'ed."
645645
)
646646
with self.assertRaisesRegex(ValueError, re.escape(expected_message)):
647647
dj_database_url.parse("postgres://user:passw#ord!@localhost/foobar")
648648

649-
def test_credentials_quoted__ok(self):
649+
def test_credentials_quoted__ok(self) -> None:
650650
url = "postgres://user%40domain:p%23ssword!@localhost/foobar"
651651
config = dj_database_url.parse(url)
652652
assert config["USER"] == "user@domain"
653653
assert config["PASSWORD"] == "p#ssword!"
654654

655-
def test_unknown_scheme__raise_value_error(self):
655+
def test_unknown_scheme__raise_value_error(self) -> None:
656656
expected_message = (
657657
"Scheme 'unknown-scheme://' is unknown. "
658658
"Did you forget to register custom backend? Following schemes have registered backends:"
659659
)
660660
with self.assertRaisesRegex(ValueError, re.escape(expected_message)):
661661
dj_database_url.parse("unknown-scheme://user:password@localhost/foobar")
662662

663-
def test_register_multiple_times__no_duplicates_in_uses_netloc(self):
663+
def test_register_multiple_times__no_duplicates_in_uses_netloc(self) -> None:
664664
# make sure that when register() function is misused,
665665
# it won't pollute urllib.parse.uses_netloc list with duplicates.
666666
# Otherwise, it might cause performance issue if some code assumes that

0 commit comments

Comments
 (0)