def test_minus_minus(self): self.assertTrue(state.is_next(ircbot.f_karma('bar--'))) self.assertEqual(ircbot.KARMA['bar'], -1)
def test_delete_zero(self): self.assertFalse(ircbot.KARMA.has_key("baz")) ircbot.f_karma("baz++") self.assertTrue(ircbot.KARMA.has_key("baz")) ircbot.f_karma("baz--") self.assertFalse(ircbot.KARMA.has_key("baz"))
def test_plus_plus(self): self.assertTrue(state.is_next(ircbot.f_karma('foo++'))) self.assertEqual(ircbot.KARMA['foo'], 1)