Skip to content

Commit 7e8f6c7

Browse files
committed
Rename get_env_vars -> get_build_env_vars
1 parent 5de265f commit 7e8f6c7

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

readthedocs/projects/tasks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ def run_build(self, record):
741741
:param record: whether or not record all the commands in the ``Build``
742742
instance
743743
"""
744-
env_vars = self.get_env_vars()
744+
env_vars = self.get_build_env_vars()
745745

746746
if settings.DOCKER_ENABLE:
747747
env_cls = DockerBuildEnvironment
@@ -932,7 +932,7 @@ def setup_vcs(self, environment):
932932
if commit:
933933
self.build['commit'] = commit
934934

935-
def get_env_vars(self):
935+
def get_build_env_vars(self):
936936
"""Get bash environment variables used for all builder commands."""
937937
env = self.get_rtd_env_vars()
938938

readthedocs/rtd_tests/tests/test_builds.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import os
33
from unittest import mock
44

5-
from allauth.socialaccount.models import SocialAccount
65
from django.contrib.auth.models import User
76
from django.test import TestCase
87
from django.utils import timezone
@@ -21,7 +20,6 @@
2120
from readthedocs.doc_builder.environments import LocalBuildEnvironment
2221
from readthedocs.doc_builder.exceptions import DuplicatedBuildError
2322
from readthedocs.doc_builder.python_environments import Virtualenv
24-
from readthedocs.oauth.models import RemoteRepository
2523
from readthedocs.projects.models import EnvironmentVariable, Feature, Project
2624
from readthedocs.projects.tasks import UpdateDocsTaskStep
2725
from readthedocs.rtd_tests.tests.test_config_integration import create_load
@@ -363,7 +361,7 @@ def test_get_env_vars(self):
363361
),
364362
'TOKEN': 'a1b2c3',
365363
}
366-
self.assertEqual(task.get_env_vars(), env)
364+
self.assertEqual(task.get_build_env_vars(), env)
367365

368366
# mock this object to make sure that we are in a conda env
369367
task.config = mock.Mock(conda=True)
@@ -377,7 +375,7 @@ def test_get_env_vars(self):
377375
'bin',
378376
),
379377
})
380-
self.assertEqual(task.get_env_vars(), env)
378+
self.assertEqual(task.get_build_env_vars(), env)
381379

382380

383381
class BuildModelTests(TestCase):

0 commit comments

Comments
 (0)