Exemplo n.º 1
0
 def setUp(self):
     """ Builds the delegate and pkmn for use in the tests """
     self.pkmn = BuildPokemonBattleWrapper()
     self.status = "PAR"
     attack = Attack()
     attack.type = ""
     self.delegate = ApplyStatusDelegate(attack, self.status, 1)
Exemplo n.º 2
0
    def immune(self):
        """ Test an effect that is immune will result in a miss """
        status, message = StatusFactory.buildStatusFromAbbr("PAR")
        self.pkmn.setStatus(status)

        effect = ApplyStatusDelegate(self.parent, "PAR", 1)
        self.buildDelegate(effect)
        assert self.delegate.immune(self.pkmn, None), "Should be immune"
Exemplo n.º 3
0
    def notImmune(self):
        """ Test an effect that is not immune returns correctly  """
        status = Status()
        self.pkmn.setStatus(status)

        effect = ApplyStatusDelegate(self.parent, "PAR", 1)
        self.buildDelegate(effect)
        assert not self.delegate.immune(self.pkmn,
                                        None), "Should not be immune"