def test_action_tokens_add_one(self): dial = Dial(self.dial_data) current_action_tokens = dial.get_current_action_tokens() dial.add_action_tokens(1) new_action_tokens = dial.get_current_action_tokens() dial.add_action_tokens(1) two_action_tokens = dial.get_current_action_tokens() self.assertEqual(current_action_tokens, 0) self.assertEqual(new_action_tokens, 1) self.assertEqual(two_action_tokens, 2)
def test_action_tokens_is_pushed(self): dial = Dial(self.dial_data) current_action_tokens = dial.get_current_action_tokens() dial.add_action_tokens(1) new_action_tokens = dial.get_current_action_tokens() self.assertEqual(new_action_tokens, 1) self.assertTrue( dial.can_push) # has 1 action token, can push by adding one more. dial.add_action_tokens(1) pushed_action_tokens = dial.get_current_action_tokens() self.assertEqual(pushed_action_tokens, 2) self.assertFalse( dial.can_push) # has 1 action token, can push by adding one more.