Пример #1
0
 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)
Пример #2
0
 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.
Пример #3
0
 def test_action_tokens_on_create(self):
     dial = Dial(self.dial_data)
     current_action_tokens = dial.get_current_action_tokens()
     self.assertEqual(current_action_tokens, 0)