'Should raise a DaemonError on receiving and OSError.'

def test_raises_daemon_error_on_os_error(self):

    args = self.test_args
    test_error = OSError(errno.ENOENT, 'No    such    directory')
    os.chdir.mock_raises = test_error
    expect_error = daemon.daemon.DaemonOSEnvironmentError
    self.failUnlessRaises(expect_error, daemon.daemon.change_working_directory, **args)
