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)
    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"
    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"