'Should request close of all open files.'

def test_requests_all_open_files_to_close(self):

    expect_file_descriptors = reversed(range(self.test_maxfd))
    expect_mock_output = ('...\n' + ''.join((('Called    daemon.daemon.close_file_descriptor_if_open(%(fd)r)\n' % vars()) for fd in expect_file_descriptors)))
    daemon.daemon.close_all_open_files()
    self.failUnlessMockCheckerMatch(expect_mock_output)
