class applyEffect(unittest.TestCase): """ Test cases of applyEffect """ def setUp(self): """ Build the Pkmn and Delegate for the test """ self.pkmn = BuildPokemonBattleWrapper() self.delegate = HealByRatioDelegate(2) def message(self): """ Test that the message is returned properly """ messages = self.delegate.applyEffect(self.pkmn, None, None) message = self.pkmn.getHeader() + HealByRatioDelegate.message assert len(messages) == 1, "Should receive one message" assert messages[0] == message, "Should be the Pokmn's header and the Delegates message"
class applyEffect(unittest.TestCase): """ Test cases of applyEffect """ def setUp(self): """ Build the Pkmn and Delegate for the test """ self.pkmn = BuildPokemonBattleWrapper() self.delegate = HealByRatioDelegate(2) def message(self): """ Test that the message is returned properly """ messages = self.delegate.applyEffect(self.pkmn, None, None) message = self.pkmn.getHeader() + HealByRatioDelegate.message assert len(messages) == 1, "Should receive one message" assert messages[ 0] == message, "Should be the Pokmn's header and the Delegates message"
def setUp(self): """ Build the Pkmn and Delegate for the test """ self.pkmn = BuildPokemonBattleWrapper() self.delegate = HealByRatioDelegate(2)