Capture XML output from test
Running a test with input yaml will result in output XML being sent to the stdout. Use mock on the console to capture this so that running the tests via testtools directly doesn't output unnecessarily Change-Id: I4ccbfcb464d40a77c04913cb8281a0167504e1a4
This commit is contained in:
parent
324e0197c4
commit
3fe85e5bbd
@ -58,7 +58,9 @@ class TestTests(CmdTestsBase):
|
||||
os.path.join(self.fixtures_path,
|
||||
'cmd-001.yaml'),
|
||||
'foo-job']
|
||||
self.execute_jenkins_jobs_with_args(args)
|
||||
console_out = io.BytesIO()
|
||||
with mock.patch('sys.stdout', console_out):
|
||||
self.execute_jenkins_jobs_with_args(args)
|
||||
|
||||
def test_console_output(self):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user