def test_run_expect_with_nonactionable_error(remote_connection): response = libs_pb2.RunExpectResponse() na_error = libs_pb2.NonActionableLibraryError() response.error.non_actionable_error.CopyFrom(na_error) with mock.patch('dlpx.virtualization._engine.libs.run_expect', return_value=response, create=True): with pytest.raises(SystemExit): libs.run_expect(remote_connection, "command")
def test_retrieve_credentials_with_nonactionable_error(): response = libs_pb2.CredentialsResponse() na_error = libs_pb2.NonActionableLibraryError() response.error.non_actionable_error.CopyFrom(na_error) with mock.patch( 'dlpx.virtualization._engine.libs.retrieve_credentials', return_value=response, create=True): with pytest.raises(SystemExit): libs.retrieve_credentials( {'some supplier property': 'some supplier value'})