Skip to content

Commit 857f33e

Browse files
committed
Don't shadow input with the new parameter
1 parent 105b9ee commit 857f33e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

SoftLayer/testing/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def set_mock(self, service, method):
157157
"""Set and return mock on the current client."""
158158
return self.mocks.set_mock(service, method)
159159

160-
def run_command(self, args=None, env=None, fixtures=True, fmt='json', input=None):
160+
def run_command(self, args=None, env=None, fixtures=True, fmt='json', stdin=None):
161161
"""A helper that runs a SoftLayer CLI command.
162162
163163
This returns a click.testing.Result object.
@@ -169,7 +169,7 @@ def run_command(self, args=None, env=None, fixtures=True, fmt='json', input=None
169169
args.insert(0, '--format=%s' % fmt)
170170

171171
runner = testing.CliRunner()
172-
return runner.invoke(core.cli, args=args, input=input, obj=env or self.env)
172+
return runner.invoke(core.cli, args=args, input=stdin, obj=env or self.env)
173173

174174

175175
def call_has_props(call, props):

tests/CLI/modules/shell_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ def test_shell_quit(self):
1616
with tempfile.NamedTemporaryFile() as stdin:
1717
stdin.write(b'exit\n')
1818
stdin.seek(0)
19-
result = self.run_command(['shell'], input=stdin)
19+
result = self.run_command(['shell'], stdin=stdin)
2020
self.assertEqual(result.exit_code, 0)
2121

2222
def test_shell_help(self):
2323
# Use a file as stdin
2424
with tempfile.NamedTemporaryFile() as stdin:
2525
stdin.write(b'help\nexit\n')
2626
stdin.seek(0)
27-
result = self.run_command(['shell'], input=stdin)
27+
result = self.run_command(['shell'], stdin=stdin)
2828
self.assertIn('Welcome to the SoftLayer shell.', result.output)
2929
self.assertEqual(result.exit_code, 0)

0 commit comments

Comments
 (0)