'Should raise a DaemonError on receiving an OSError from umask.'

def test_raises_daemon_error_on_os_error_from_chdir(self):

    args = self.test_args
    test_error = OSError(errno.EINVAL, "Whatchoo    talkin'    'bout?")
    os.umask.mock_raises = test_error
    expect_error = daemon.daemon.DaemonOSEnvironmentError
    self.failUnlessRaises(expect_error, daemon.daemon.change_file_creation_mask, **args)
