diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-10-27 20:59:02 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-10-27 20:59:03 +0000 |
commit | f0c99b70a717264304ef30dd781687c4a4982869 (patch) | |
tree | 595f03ef6784103cad13766b0f797b2d1685b46a /tests/cmd | |
parent | 771a94227ce6b1ed718f64a782d09e9c675c6735 (diff) | |
parent | 4b63891dd72163a1cd206263961924df1593baf4 (diff) | |
download | python-jenkins-job-builder-f0c99b70a717264304ef30dd781687c4a4982869.tar.gz python-jenkins-job-builder-f0c99b70a717264304ef30dd781687c4a4982869.tar.xz python-jenkins-job-builder-f0c99b70a717264304ef30dd781687c4a4982869.zip |
Merge "user's input should not be interpreted"
Diffstat (limited to 'tests/cmd')
-rw-r--r-- | tests/cmd/subcommands/test_delete_all.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/cmd/subcommands/test_delete_all.py b/tests/cmd/subcommands/test_delete_all.py index 15fc23dd..39264994 100644 --- a/tests/cmd/subcommands/test_delete_all.py +++ b/tests/cmd/subcommands/test_delete_all.py @@ -17,8 +17,6 @@ # of actions by the JJB library, usually through interaction with the # python-jenkins library. -import six - from tests.base import mock from tests.cmd.test_cmd import CmdTestsBase @@ -27,8 +25,6 @@ from tests.cmd.test_cmd import CmdTestsBase mock.MagicMock) class DeleteAllTests(CmdTestsBase): - input_module = "jenkins_jobs.utils" if six.PY2 else "builtins" - @mock.patch('jenkins_jobs.cli.subcommand.update.' 'JenkinsManager.delete_all_jobs') def test_delete_all_accept(self, delete_job_mock): @@ -37,7 +33,7 @@ class DeleteAllTests(CmdTestsBase): """ args = ['--conf', self.default_config_file, 'delete-all'] - with mock.patch('%s.input' % self.input_module, return_value="y"): + with mock.patch('jenkins_jobs.utils.input', return_value="y"): self.execute_jenkins_jobs_with_args(args) @mock.patch('jenkins_jobs.cli.subcommand.update.' @@ -48,6 +44,6 @@ class DeleteAllTests(CmdTestsBase): """ args = ['--conf', self.default_config_file, 'delete-all'] - with mock.patch('%s.input' % self.input_module, return_value="n"): + with mock.patch('jenkins_jobs.utils.input', return_value="n"): self.assertRaises(SystemExit, self.execute_jenkins_jobs_with_args, args) |