Ejemplo n.º 1
0
    def test_sets_to_60_seconds(self):
        split_msg = [
            '', 'inactive', 'Time left: 60 sec this turn', '60 sec total'
        ]
        inactive(self.battle, split_msg)

        self.assertEqual(60, self.battle.time_remaining)
Ejemplo n.º 2
0
    def test_sets_time_to_15_seconds(self):
        split_msg = [
            '', 'inactive', 'Time left: 135 sec this turn', '135 sec total'
        ]
        inactive(self.battle, split_msg)

        self.assertEqual(135, self.battle.time_remaining)
Ejemplo n.º 3
0
    def test_capture_group_failing(self):
        self.battle.time_remaining = 1
        split_msg = ['', 'inactive', 'some random message']
        inactive(self.battle, split_msg)

        self.assertEqual(1, self.battle.time_remaining)
Ejemplo n.º 4
0
    def test_different_inactive_message_does_not_change_time(self):
        self.battle.time_remaining = 1
        split_msg = ['', 'inactive', 'Some Other Person has 10 seconds left']
        inactive(self.battle, split_msg)

        self.assertEqual(1, self.battle.time_remaining)
Ejemplo n.º 5
0
    def test_capture_group_failing_but_message_starts_with_username(self):
        self.battle.time_remaining = 1
        split_msg = ['', 'inactive', 'Time left: some random message']
        inactive(self.battle, split_msg)

        self.assertEqual(1, self.battle.time_remaining)