-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.py
62 lines (39 loc) · 1.4 KB
/
tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import unittest
from models import Perro, Oveja, Gato, Pajaro, Vaca
class TestPerro(unittest.TestCase):
def test_deberia_ladrar(self):
perro = Perro()
self.assertEqual("guuau guuaa", perro.ladrar())
def test_deberia_ser_marron(self):
perro = Perro()
self.assertEqual("marron", perro.color)
class TestOveja(unittest.TestCase):
def test_deberia_balar(self):
oveja = Oveja()
self.assertEqual("ruido de oveja", oveja.balar())
def test_deberia_ser_blanca(self):
oveja = Oveja()
self.assertEqual("blanca", oveja.color)
class TestGato(unittest.TestCase):
def test_deberia_maullar(self):
gato = Gato()
self.assertEqual("ruido de gato", gato.maullar())
def test_deberia_ser_naranja(self):
gato = Gato()
self.assertEqual("naranja", gato.color)
class TestPajaro(unittest.TestCase):
def test_deberia_piar(self):
pajaro = Pajaro()
self.assertEqual("PEW", pajaro.piar())
def test_deberia_ser_amarillo(self):
pajaro = Pajaro()
self.assertEqual("amarillo", pajaro.color)
class TestVaca(unittest.TestCase):
def test_deberia_mugir(self):
vaca = Vaca()
self.assertEqual("ruido de vaca", vaca.mugir())
def test_deberia_ser_negra(self):
vaca = Vaca()
self.assertEqual("negra", vaca.color)
if __name__ == '__main__':
unittest.main()