Skip to content

Commit 4e1c4ec

Browse files
committed
Fix tests
1 parent ae52844 commit 4e1c4ec

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

readthedocs/projects/tasks.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,13 @@ def validate_duplicate_reserved_versions(self, tags_data, branches_data):
311311
RepositoryError.DUPLICATED_RESERVED_VERSIONS,
312312
)
313313

314+
def get_vcs_env_vars(self):
315+
"""Get environment variables to be included in the VCS setup step."""
316+
env = self.get_rtd_env_vars()
317+
# Don't prompt for username, this requires Git 2.3+
318+
env['GIT_TERMINAL_PROMPT'] = '0'
319+
return env
320+
314321
def get_rtd_env_vars(self):
315322
"""Get bash environment variables specific to Read the Docs."""
316323
env = {
@@ -962,13 +969,6 @@ def get_env_vars(self):
962969

963970
return env
964971

965-
def get_vcs_env_vars(self):
966-
"""Get environment variables to be included in the VCS setup step."""
967-
env = self.get_rtd_env_vars()
968-
# Don't prompt for username, this requires Git 2.3+
969-
env['GIT_TERMINAL_PROMPT'] = '0'
970-
return env
971-
972972
def set_valid_clone(self):
973973
"""Mark on the project that it has been cloned properly."""
974974
api_v2.project(self.project.pk).patch(

readthedocs/rtd_tests/tests/test_doc_building.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ def test_command_env(self):
10241024
env = {'FOOBAR': 'foobar', 'BIN_PATH': 'foobar'}
10251025
cmd = BuildCommand('echo', environment=env)
10261026
for key in list(env.keys()):
1027-
self.assertEqual(cmd.environment[key], env[key])
1027+
self.assertEqual(cmd._environment[key], env[key])
10281028

10291029
def test_result(self):
10301030
"""Test result of output using unix true/false commands."""

0 commit comments

Comments
 (0)