def METHOD_NAME(self):
    oldlist = keyword.kwlist
    self.addCleanup(setattr, keyword, 'kwlist', oldlist)
    keyword.kwlist = ['its', 'all', 'eggs', 'beans', 'and', 'a', 'slice']
    self.assertFalse(keyword.iskeyword('eggs'))