def tearDown(self): policy.reset()
def test_reset(self): # Make sure the rules are reset policy._rules = 'spam' policy.reset() self.assertEqual(policy._rules, None)
def test_reset(self): # Make sure the brain is set to something policy._BRAIN = 'spam' policy.reset() self.assertEqual(policy._BRAIN, None)
def reset(): global _POLICY_PATH global _POLICY_CACHE _POLICY_PATH = None _POLICY_CACHE = {} policy.reset()