Exemple #1
0
class cantHandle(unittest.TestCase):
    """ Test cases of cantHandle """
    def setUp(self):
        """ Build the FaintDelegate for the test """
        self.handler = UserFaintDelegate()
        self.user = BuildPokemonBattleWrapper()

    def userFainted(self):
        """ Test that it can't handle the user fainting """
        self.user.faint()
        cantHandle = self.handler.cantHandle(user=self.user)
        assert cantHandle, "Shouldn't handle when the user is fainted"

    def userNotFainted(self):
        """ Test that it can handle when the user is not fainted """
        cantHandle = self.handler.cantHandle(user=self.user)
        assert not cantHandle, "Should handle when the user is not fainted"
class cantHandle(unittest.TestCase):
    """ Test cases of cantHandle """
    
    def  setUp(self):
        """ Build the FaintDelegate for the test """
        self.handler = UserFaintDelegate()
        self.user = BuildPokemonBattleWrapper()
        
    def userFainted(self):
        """ Test that it can't handle the user fainting """
        self.user.faint()
        cantHandle = self.handler.cantHandle(user = self.user)
        assert cantHandle, "Shouldn't handle when the user is fainted"
        
    def userNotFainted(self):
        """ Test that it can handle when the user is not fainted """
        cantHandle = self.handler.cantHandle(user = self.user)
        assert not cantHandle, "Should handle when the user is not fainted"
 def  setUp(self):
     """ Build the FaintDelegate for the test """
     self.handler = UserFaintDelegate()
     self.user = BuildPokemonBattleWrapper()
Exemple #4
0
 def setUp(self):
     """ Build the FaintDelegate for the test """
     self.handler = UserFaintDelegate()
     self.user = BuildPokemonBattleWrapper()