def METHOD_NAME(self, rename):
    self.addCleanup(self.wipe_whitelist)
    rename.side_effect = OSError(errno.EPERM, 'Operation not permitted')
    with self.assertRaises(OSError):
        save_whitelist({'a.b.c.d','e.f.g.h'})