Skip to content

Commit 41c86d4

Browse files
authored
.
1 parent 596b1a3 commit 41c86d4

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tests/test_initialization.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_ds():
6363
assert result.ret == 0
6464

6565

66-
def test_django_setup_dependency_load(pytester: pytest.Pytester, django_pytester: DjangoPytester, monkeypatch: pytest.MonkeyPatch) -> None:
66+
def test_django_setup_dependency_load(pytester: pytest.Pytester, monkeypatch: pytest.MonkeyPatch) -> None:
6767
monkeypatch.setenv("DJANGO_SETTINGS_MODULE", "tpkg.settings_dev")
6868
pkg = pytester.mkpydir("tpkg")
6969
pkg.joinpath("settings_dev.py").write_text(
@@ -80,11 +80,13 @@ def test_django_setup_dependency_load(pytester: pytest.Pytester, django_pytester
8080
"""
8181
)
8282
)
83-
django_pytester.makepyfile(
84-
"""
85-
def test_ds(settings):
86-
assert settings.SOME_VARIABLE == "fake"
87-
"""
83+
pkg.joinpath("settings_test.py").write_text(
84+
dedent(
85+
"""
86+
def test_ds(settings):
87+
assert settings.SOME_VARIABLE == "fake"
88+
"""
89+
)
8890
)
89-
result = django_pytester.runpytest_subprocess("-s", "-ds", "tpkg.settings_test")
91+
result = pytester.runpytest_subprocess("-s", "-ds", "tpkg.settings_test")
9092
assert result.ret == 0

0 commit comments

Comments
 (0)