Exemplo n.º 1
0
    def test_user_boosts_updates_properly(self):
        split_msg = ['', 'boost', 'p1a: Caterpie', 'atk', '1']
        boost(self.battle, split_msg)

        expected_boosts = {constants.ATTACK: 1}

        self.assertEqual(expected_boosts, self.battle.user.active.boosts)
Exemplo n.º 2
0
    def test_opponent_boost_properly_updates_opponent_pokemons_boosts(self):
        split_msg = ['', 'boost', 'p2a: Weedle', 'atk', '1']
        boost(self.battle, split_msg)

        expected_boosts = {constants.ATTACK: 1}

        self.assertEqual(expected_boosts, self.battle.opponent.active.boosts)
Exemplo n.º 3
0
    def test_boost_lowers_one_when_it_hits_the_limit(self):
        self.battle.opponent.active.boosts[constants.ATTACK] = 5
        split_msg = ['', 'boost', 'p2a: Weedle', 'atk', '2']
        boost(self.battle, split_msg)

        expected_boosts = {constants.ATTACK: 6}

        self.assertEqual(expected_boosts,
                         dict(self.battle.opponent.active.boosts))
Exemplo n.º 4
0
    def test_boost_does_not_lower_below_negative_6(self):
        self.battle.opponent.active.boosts[constants.ATTACK] = 6
        split_msg = ['', 'boost', 'p2a: Weedle', 'atk', '2']
        boost(self.battle, split_msg)

        expected_boosts = {constants.ATTACK: 6}

        self.assertEqual(expected_boosts,
                         dict(self.battle.opponent.active.boosts))