def test_graph_states(): with patch.object(taskcluster.Queue, "listTaskGroup", new=mocked_listTaskGroup): graph = TaskGraph("eShtp2faQgy4iZZOIhXvhw") assert graph.current_states() == { "completed": 3, "failed": 1, "unscheduled": 1 }
def test_graph_states(): with patch.object(taskcluster.Queue, 'listTaskGroup', new=mocked_listTaskGroup) as mocked_method: graph = TaskGraph('eShtp2faQgy4iZZOIhXvhw') assert graph.current_states() == {'completed': 3, 'failed': 1, 'unscheduled': 1}