Example #1
0
class immune(unittest.TestCase):
    """ Test that immune returns correctly """
    
    def setUp(self):
        """ Builds the Poison status"""
        self.status = Poison()
    
    def immune(self):
        """ Test if it can correctly identify when the target is immune """
        types = ["STEEL"]
        other = "ELECTRIC"
        assert self.status.immune(types, other), "Should be immune if STEEL"
        
        types = ["POISON", "FIRE"]
        other = "ELECTRIC"
        assert self.status.immune(types, other), "Should be immune if POSION"
            
    def notImmune(self):
        """ Test if it can correctly identify when the target is immune """
        types = ["ELECTRIC"]
        other = "FIRE"
        assert not self.status.immune(types, other), "Should not be immune if not POISON or STEEL"
Example #2
0
 def setUp(self):
     """ Builds the Poison status"""
     self.status = Poison()