'Run through a tool test case.'

def do_it(self, testdef):

    shed_tool_id = self.shed_tool_id
    self._handle_test_def_errors(testdef)
    galaxy_interactor = self._galaxy_interactor(testdef)
    test_history = galaxy_interactor.new_history()
    stage_data_in_history(galaxy_interactor, testdef.test_data(), test_history, shed_tool_id)
    galaxy_interactor.run_tool(testdef, test_history)
    data_manager_history = None
    for assoc in reversed(test_history.user.data_manager_histories):
        if (not assoc.history.deleted):
            data_manager_history = assoc.history
            break
    self.switch_history(id=self.security.encode_id(data_manager_history.id))
    data_list = self.get_history_as_data_list()
    self.assertTrue(data_list)
    self._verify_outputs(testdef, data_manager_history, shed_tool_id, data_list, galaxy_interactor)
    self.switch_history(id=self.security.encode_id(test_history.id))
    galaxy_interactor.delete_history(test_history)
