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)
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)
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)
def testNoAceptaAdd(self): reservas = reserva() msg = "no debe agregar" self.assertRaises(ValueError,reservas.addReserva,"0900","0600")
def testAceptaAdd2(self): reservas = reserva() reservas.addReserva("0900", "0900") msg = "agrego2" self.assertEqual(reservas.lista, [(900,1),(900,-1)], msg)
def testNoReserva(self): reservas = reserva() msg = 'no reservas' self.assertEqual(True, reservas.validar(), msg)