'Set up test fixtures.'

def setUp(self):

    self.mock_tracker = scaffold.MockTracker()
    mock_signal_module = ModuleType('signal')
    mock_signal_names = ['SIGHUP', 'SIGCLD', 'SIGSEGV', 'SIGTSTP', 'SIGTTIN', 'SIGTTOU', 'SIGTERM']
    for name in mock_signal_names:
        setattr(mock_signal_module, name, object())
    scaffold.mock('signal', mock_obj=mock_signal_module, tracker=self.mock_tracker)
    scaffold.mock('daemon.daemon.signal', mock_obj=mock_signal_module, tracker=self.mock_tracker)
    default_signal_map_by_name = {'SIGTSTP': None, 'SIGTTIN': None, 'SIGTTOU': None, 'SIGTERM': 'terminate'}
    self.default_signal_map = dict(((getattr(signal, name), target) for (name, target) in default_signal_map_by_name.items()))
