def testTarifaMax(self):
     tari = Tarifa(257698037700, 257698037700)
     tiempo = [
         datetime(year=2015, month=1, day=1),
         datetime(year=2015, month=1, day=8)
     ]
     calcularPrecio(tari, tiempo)
 def testTarifaCero(self):
     tari = Tarifa(0, 0)
     tiempo = [
         datetime(year=2015, month=1, day=1),
         datetime(year=2015, month=1, day=3)
     ]
     resultado = calcularPrecio(tari, tiempo)
     assert resultado == 0.00
 def testLetras(self):
     calcularPrecio('a', 'b')
Beispiel #4
0
 def testFaltan20ParaLasDoce(self):
     tarifa = tarea2.Tarifa(1,2)
     i,f=datetime(2015,12,31,23,40),datetime(2016,1,1,0,0)
     monto=tarea2.calcularPrecio(tarifa,[i,f])
     self.assertEqual(1,monto)
Beispiel #5
0
 def testCeroMinutos(self):
     tarifa = tarea2.Tarifa(1,2)
     i,f=datetime(2016,5,2,23,0),datetime(2016,5,2,23,0)
     monto=tarea2.calcularPrecio(tarifa,[i,f])
     self.assertEqual(0,monto)
Beispiel #6
0
 def testSeisDiasYUnMinuto(self):
     tarifa = tarea2.Tarifa(1,2)
     i,f=datetime(2016,4,28,0,0),datetime(2016,5,4,0,1)
     monto=tarea2.calcularPrecio(tarifa,[i,f])
     self.assertEqual(193,monto)
Beispiel #7
0
 def test24HorasBordesSemana(self):
     tarifa = tarea2.Tarifa(1,2)
     i,f=datetime(2016,5,2,0,1),datetime(2016,5,2,23,59)
     monto=tarea2.calcularPrecio(tarifa,[i,f])
     self.assertEqual(24,monto)
Beispiel #8
0
 def testQuinceMinutosEntreDomingoYLunes(self):
     tarifa = tarea2.Tarifa(20,40)
     i,f=datetime(2016,4,10,23,53),datetime(2016,4,11,0,8)
     monto=tarea2.calcularPrecio(tarifa,[i,f])
     self.assertEqual(60,monto)
Beispiel #9
0
 def testSieteDiasYUnMinuto(self):
     tarifa = tarea2.Tarifa(20,40)
     i,f=datetime(2016,4,28,0,0),datetime(2016,5,5,0,1)
     monto=tarea2.calcularPrecio(tarifa,[i,f])
     self.assertEqual(0,monto)
Beispiel #10
0
 def testQuinceMinutosEntreViernesYSabado(self):
     tarifa = tarea2.Tarifa(20,40)
     i,f=datetime(2016,4,8,23,53),datetime(2016,4,9,0,8)
     monto=tarea2.calcularPrecio(tarifa,[i,f])
     self.assertEqual(60,monto)
Beispiel #11
0
 def testMenosDeQuinceMinutos(self):
     tarifa = tarea2.Tarifa(20,40)
     i,f=datetime(2016,5,5,0,0),datetime(2016,5,5,0,10)
     monto=tarea2.calcularPrecio(tarifa,[i,f])
     self.assertEqual(0,monto)
Beispiel #12
0
 def testAniosDistintos(self):
     tarifa = tarea2.Tarifa(20,40)
     i,f=datetime(2007,12,28,3,0),datetime(2008,1,2,21,0)
     monto=tarea2.calcularPrecio(tarifa,[i,f])
     self.assertEqual(3720,monto)
Beispiel #13
0
 def testMesesDistintos(self):
     tarifa = tarea2.Tarifa(20,40)
     i,f=datetime(2007,8,28,4,0),datetime(2007,9,2,21,0)
     monto=tarea2.calcularPrecio(tarifa,[i,f])
     self.assertEqual(3640,monto)
Beispiel #14
0
 def testFechaInicioMayorFechaFinal(self):
     tarifa = tarea2.Tarifa(20,40)
     i,f=datetime(2016,5,5,0,0),datetime(2016,4,28,0,0)
     monto=tarea2.calcularPrecio(tarifa,[i,f])
     self.assertEqual(0,monto)