def test_get_single_state(self): s = MockStatus() with patch(PIPELINE_STATUS_GET, MagicMock(return_value=s)): state = api.get_single_state(self.node_id) self.assertEqual( state, { 'state': s.state, 'started_time': s.started_time, 'finished_time': s.archived_time, 'retry': s.retry, 'skip': s.skip })
def get_single_state(node_id): return api.get_single_state(node_id)