class TestPandaClass(unittest.TestCase): def setUp(self): self.ivo = Panda("Ivo", "*****@*****.**", "male") def test_get_name(self): self.assertEqual("Ivo", self.ivo.get_name()) def test_get_email(self): self.assertEqual(self.ivo.get_email(), "*****@*****.**") def test_get_gender(self): self.assertEqual("male", self.ivo.get_gender()) def test_isMale(self): maria = Panda("maria", "*****@*****.**", "female") self.assertTrue(self.ivo.isMale()) self.assertFalse(maria.isMale()) def test_isFemale(self): maria = Panda("maria", "*****@*****.**", "female") self.assertTrue(maria.isFemale()) self.assertFalse(self.ivo.isFemale())
def test_isFemale(self): maria = Panda("maria", "*****@*****.**", "female") self.assertTrue(maria.isFemale()) self.assertFalse(self.ivo.isFemale())