We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c851a7 commit 16db732Copy full SHA for 16db732
tests/test_django_settings_module.py
@@ -535,6 +535,27 @@ def test_ds():
535
assert result.ret == 0
536
537
538
+def test_dch_ini_invalid_path(testdir, monkeypatch) -> None:
539
+ monkeypatch.delenv("DJANGO_SETTINGS_MODULE")
540
+ testdir.makeini(
541
+ """
542
+ [pytest]
543
+ DJANGO_CONFIGURATION_HOOK = invalid_path
544
545
+ )
546
+ testdir.makepyfile(
547
548
+ import os
549
+
550
+ def test_ds():
551
+ pass
552
553
554
+ result = testdir.runpytest_subprocess()
555
+ result.stderr.fnmatch_lines(["ImportError: Invalid path for configuration hook: invalid_path"])
556
+ assert result.ret == 1
557
558
559
def test_dch_ini_no_module(testdir, monkeypatch) -> None:
560
monkeypatch.delenv("DJANGO_SETTINGS_MODULE")
561
testdir.makeini(
0 commit comments