@@ -218,14 +218,14 @@ def test_memory_sqlite_url(self) -> None:
218
218
assert url ["ENGINE" ] == "django.db.backends.sqlite3"
219
219
assert url ["NAME" ] == ":memory:"
220
220
221
- def test_sqlite_relative_url (self ):
221
+ def test_sqlite_relative_url (self ) -> None :
222
222
url = "sqlite:///db.sqlite3"
223
223
config = dj_database_url .parse (url )
224
224
225
225
assert config ["ENGINE" ] == "django.db.backends.sqlite3"
226
226
assert config ["NAME" ] == "db.sqlite3"
227
227
228
- def test_sqlite_absolute_url (self ):
228
+ def test_sqlite_absolute_url (self ) -> None :
229
229
# 4 slashes are needed:
230
230
# two are part of scheme
231
231
# one separates host:port from path
@@ -638,29 +638,29 @@ def test_no_env_variable(self) -> None:
638
638
'WARNING:root:No DATABASE_URL environment variable set, and so no databases setup'
639
639
], cm .output
640
640
641
- def test_credentials_unquoted__raise_value_error (self ):
641
+ def test_credentials_unquoted__raise_value_error (self ) -> None :
642
642
expected_message = (
643
643
"This string is not a valid url, possibly because some of its parts "
644
644
r"is not properly urllib.parse.quote()'ed."
645
645
)
646
646
with self .assertRaisesRegex (ValueError , re .escape (expected_message )):
647
647
dj_database_url .parse ("postgres://user:passw#ord!@localhost/foobar" )
648
648
649
- def test_credentials_quoted__ok (self ):
649
+ def test_credentials_quoted__ok (self ) -> None :
650
650
url = "postgres://user%40domain:p%23ssword!@localhost/foobar"
651
651
config = dj_database_url .parse (url )
652
652
assert config ["USER" ] == "user@domain"
653
653
assert config ["PASSWORD" ] == "p#ssword!"
654
654
655
- def test_unknown_scheme__raise_value_error (self ):
655
+ def test_unknown_scheme__raise_value_error (self ) -> None :
656
656
expected_message = (
657
657
"Scheme 'unknown-scheme://' is unknown. "
658
658
"Did you forget to register custom backend? Following schemes have registered backends:"
659
659
)
660
660
with self .assertRaisesRegex (ValueError , re .escape (expected_message )):
661
661
dj_database_url .parse ("unknown-scheme://user:password@localhost/foobar" )
662
662
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 :
664
664
# make sure that when register() function is misused,
665
665
# it won't pollute urllib.parse.uses_netloc list with duplicates.
666
666
# Otherwise, it might cause performance issue if some code assumes that
0 commit comments