Skip to content

Commit 397fb2d

Browse files
committed
configuration magicmock trial
1 parent 2de16b6 commit 397fb2d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

readthedocs/rtd_tests/tests/test_doc_builder.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,12 @@ def test_project_without_mkdocs_yaml(
159159
checkout_path.return_value = tmp_dir
160160
docs_dir.return_value = tmp_dir
161161
get_mkdocs_yaml_path.side_effect = MkDocsYAMLParseError
162-
mock_config = mock.Mock()
163-
mock_config.mkdocs = mock.Mock(configuration="mkdocs.yml")
162+
mock_config = mock.MagicMock()
163+
mock_config.mkdocs.configuration = "mkdocs.yml"
164+
165+
python_env = mock.MagicMock()
166+
python_env.config = mock_config
164167

165-
load_yaml_config.return_value = mock_config
166-
python_env = Virtualenv(
167-
version=self.version,
168-
build_env=self.build_env,
169-
config=get_build_config({}, validate=True),
170-
)
171168
base_mkdocs = BaseMkdocs(
172169
build_env=self.build_env,
173170
python_env=python_env,

0 commit comments

Comments
 (0)