Exemple #1
0
 def testTresReserva(self):
     reservas = reserva()
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     msg = 'tres reservas'
     self.assertEqual(True, reservas.validar(), msg)
Exemple #2
0
 def testOnceReservaNoChocan(self):
     reservas = reserva()
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     msg = 'dies reservas'
     self.assertEqual(True, reservas.validar(), msg)
     reservas.addReserva("0600", "0900")
     msg = 'once reservas'
     self.assertEqual(True, reservas.validar(), msg)
Exemple #3
0
 def testReservasEntraSale(self):
     reservas = reserva()
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "0900")
     reservas.addReserva("1000", "1000")
     reservas.addReserva("1100", "1100")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     reservas.addReserva("0900", "1800")
     msg = 'dies reservas'
     self.assertEqual(True, reservas.validar(), msg)
     reservas.addReserva("0600", "0900")
     msg = 'once reservas'
     self.assertEqual(True, reservas.validar(), msg)
Exemple #4
0
 def testNoAceptaAdd(self):
     reservas = reserva()
     msg = "no debe agregar"
     self.assertRaises(ValueError,reservas.addReserva,"0900","0600")
Exemple #5
0
 def testAceptaAdd2(self):
     reservas = reserva()
     reservas.addReserva("0900", "0900")
     msg = "agrego2"
     self.assertEqual(reservas.lista, [(900,1),(900,-1)], msg)
Exemple #6
0
 def testNoReserva(self):
     reservas = reserva()
     msg = 'no reservas'
     self.assertEqual(True, reservas.validar(), msg)