'Set up test fixtures.'

def setUp(self):

    setup_daemon_context_fixtures(self)
    self.mock_tracker.clear()
    self.test_instance._is_open = False
    scaffold.mock('daemon.daemon.detach_process_context', tracker=self.mock_tracker)
    scaffold.mock('daemon.daemon.change_working_directory', tracker=self.mock_tracker)
    scaffold.mock('daemon.daemon.change_root_directory', tracker=self.mock_tracker)
    scaffold.mock('daemon.daemon.change_file_creation_mask', tracker=self.mock_tracker)
    scaffold.mock('daemon.daemon.change_process_owner', tracker=self.mock_tracker)
    scaffold.mock('daemon.daemon.prevent_core_dump', tracker=self.mock_tracker)
    scaffold.mock('daemon.daemon.close_all_open_files', tracker=self.mock_tracker)
    scaffold.mock('daemon.daemon.redirect_stream', tracker=self.mock_tracker)
    scaffold.mock('daemon.daemon.set_signal_handlers', tracker=self.mock_tracker)
    scaffold.mock('daemon.daemon.register_atexit_function', tracker=self.mock_tracker)
    self.test_files_preserve_fds = object()
    scaffold.mock('daemon.daemon.DaemonContext._get_exclude_file_descriptors', returns=self.test_files_preserve_fds, tracker=self.mock_tracker)
    self.test_signal_handler_map = object()
    scaffold.mock('daemon.daemon.DaemonContext._make_signal_handler_map', returns=self.test_signal_handler_map, tracker=self.mock_tracker)
    scaffold.mock('sys.stdin', tracker=self.mock_tracker)
    scaffold.mock('sys.stdout', tracker=self.mock_tracker)
    scaffold.mock('sys.stderr', tracker=self.mock_tracker)
