Commit 72108d62 authored by Jérome Perrin's avatar Jérome Perrin

tests: fix tests.cli.test_console_interactive indentation

This test was indented with 4 spaces, unlike the rest of this file which
was 2 spaces.
parent 348f5136
Pipeline #5688 passed with stage
......@@ -343,20 +343,20 @@ master_url=null
self.addCleanup(self.config_file.close)
def test_console_interactive(self):
app = slapos.cli.entry.SlapOSApp()
saved_stdin = sys.stdin
saved_stdout = sys.stdout
try:
sys.stdin = app_stdin = StringIO.StringIO(
"""print request('software_release', 'instance').getInstanceParameterDict()['parameter_name']\n""")
sys.stdout = app_stdout = StringIO.StringIO()
app.run(('console', '--cfg', self.config_file.name))
finally:
sys.stdin = saved_stdin
sys.stdout = saved_stdout
app = slapos.cli.entry.SlapOSApp()
saved_stdin = sys.stdin
saved_stdout = sys.stdout
try:
sys.stdin = app_stdin = StringIO.StringIO(
"""print request('software_release', 'instance').getInstanceParameterDict()['parameter_name']\n""")
sys.stdout = app_stdout = StringIO.StringIO()
app.run(('console', '--cfg', self.config_file.name))
finally:
sys.stdin = saved_stdin
sys.stdout = saved_stdout
self.mock_request.assert_called_once_with('software_release', 'instance')
self.assertIn('parameter_value', app_stdout.getvalue())
self.mock_request.assert_called_once_with('software_release', 'instance')
self.assertIn('parameter_value', app_stdout.getvalue())
def test_console_script(self):
with tempfile.NamedTemporaryFile() as script:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment