with patch(release_stages.gs, 'GSContext') as mock_gs_ctx_init:
mock_gs_ctx = mock_gs_ctx_init.return_value
- mock_gs_ctx.Cat.return_value.output = self.SIGNER_RESULT
+ mock_gs_ctx.Cat.return_value = self.SIGNER_RESULT
notifier = mock.Mock()
stage = self.ConstructStage()
"""Test _WaitForSigningResults when there are no signed images."""
with patch(release_stages.gs, 'GSContext') as mock_gs_ctx_init:
mock_gs_ctx = mock_gs_ctx_init.return_value
- mock_gs_ctx.Cat.return_value.output = self.SIGNER_RESULT
+ mock_gs_ctx.Cat.return_value = self.SIGNER_RESULT
notifier = mock.Mock()
stage = self.ConstructStage()
"""Test _WaitForSigningResults when the signers report an error."""
with patch(release_stages.gs, 'GSContext') as mock_gs_ctx_init:
mock_gs_ctx = mock_gs_ctx_init.return_value
- mock_gs_ctx.Cat.return_value.output = """
+ mock_gs_ctx.Cat.return_value = """
{ "status": { "status": "failed" }, "board": "link",
"keyset": "link-mp-v4", "type": "recovery", "channel": "stable" }
"""
"""Test _WaitForSigningResults when invalid Json is received.."""
with patch(release_stages.gs, 'GSContext') as mock_gs_ctx_init:
mock_gs_ctx = mock_gs_ctx_init.return_value
- mock_gs_ctx.Cat.return_value.output = "{"
+ mock_gs_ctx.Cat.return_value = "{"
notifier = mock.Mock()
stage = self.ConstructStage()
"""Test that _CheckForResults works when signing works."""
with patch(release_stages.gs, 'GSContext') as mock_gs_ctx_init:
mock_gs_ctx = mock_gs_ctx_init.return_value
- mock_gs_ctx.Cat.return_value.output = self.SIGNER_RESULT
+ mock_gs_ctx.Cat.return_value = self.SIGNER_RESULT
notifier = mock.Mock()
stage = self.ConstructStage()
"""Verify _CheckForResults handles partial signing results."""
def catChan2Success(url):
if url.startswith('chan2'):
- result = mock.Mock()
- result.output = self.SIGNER_RESULT
- return result
+ return self.SIGNER_RESULT
else:
raise release_stages.gs.GSNoSuchKey()
"""Verify _CheckForResults handles unexpected Json values."""
with patch(release_stages.gs, 'GSContext') as mock_gs_ctx_init:
mock_gs_ctx = mock_gs_ctx_init.return_value
- mock_gs_ctx.Cat.return_value.output = "{}"
+ mock_gs_ctx.Cat.return_value = "{}"
notifier = mock.Mock()
stage = self.ConstructStage()
run_parallel=True,
run_on_builder=True,
skip_delta_payloads=False,
- skip_test_payloads=False,
- skip_autotest=False)
+ disable_tests=False)
def testRunPaygenInProcessComplex(self):
"""Test that _RunPaygenInProcess with arguments that are more unusual."""
run_parallel=True,
run_on_builder=True,
skip_delta_payloads=True,
- skip_test_payloads=True,
- skip_autotest=True)
+ disable_tests=True)
if __name__ == '__main__':
cros_test_lib.main()