当前位置: 首页>>代码示例>>Python>>正文


Python models.TarifaHorayFraccion类代码示例

本文整理汇总了Python中estacionamientos.models.TarifaHorayFraccion的典型用法代码示例。如果您正苦于以下问题:Python TarifaHorayFraccion类的具体用法?Python TarifaHorayFraccion怎么用?Python TarifaHorayFraccion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TarifaHorayFraccion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_tarifa_hora_y_fraccion_motos_decimal

 def test_tarifa_hora_y_fraccion_motos_decimal(self):
     rate=TarifaHorayFraccion(tarifa_motos=0.3)
     initial_time=datetime(2015,2,20,15,0)
     final_time=datetime(2015,2,20,17,25)
     vehiculo = 'Moto'
     value = rate.calcularPrecio(initial_time, final_time, vehiculo)
     self.assertEqual(value, Decimal('0.75'))
开发者ID:Soft-Gear,项目名称:SAGE,代码行数:7,代码来源:tests_decimal.py

示例2: test_tarifa_hora_y_fraccion_un_dia_treinta_minutes_antes_de_la_medianoche_mas_treinta_y_un_minutos

 def test_tarifa_hora_y_fraccion_un_dia_treinta_minutes_antes_de_la_medianoche_mas_treinta_y_un_minutos(self):
     initial_time = datetime(2015,2,18,23,30)
     final_time = datetime(2015,2,20,0,1)
     rate = TarifaHorayFraccion(tarifa = 2)
     self.assertEqual(rate.calcularPrecio(initial_time,final_time),50)
开发者ID:Arleyn,项目名称:Sage-Edwin,代码行数:5,代码来源:tests_tarifa_hora_fraccion.py

示例3: test_tarifa_hora_y_fraccion_un_dia_mas_media_hora_mas_un_minuto

 def test_tarifa_hora_y_fraccion_un_dia_mas_media_hora_mas_un_minuto(self):
     initial_time = datetime(2015,2,18,0,0)
     final_time = datetime(2015,2,19,0,31)
     rate = TarifaHorayFraccion(tarifa = 2)
     self.assertEqual(rate.calcularPrecio(initial_time,final_time),50)
开发者ID:Arleyn,项目名称:Sage-Edwin,代码行数:5,代码来源:tests_tarifa_hora_fraccion.py

示例4: test_tarifa_hora_y_fraccion_un_dia_menos_un_minuto

 def test_tarifa_hora_y_fraccion_un_dia_menos_un_minuto(self): # Borde
     initial_time = datetime(2015,2,18,0,0)
     final_time = datetime(2015,2,18,23,59)
     rate = TarifaHorayFraccion(tarifa = 2)
     self.assertEqual(rate.calcularPrecio(initial_time,final_time),48)
开发者ID:Arleyn,项目名称:Sage-Edwin,代码行数:5,代码来源:tests_tarifa_hora_fraccion.py

示例5: test_tarifa_hora_y_fraccion_un_dia

 def test_tarifa_hora_y_fraccion_un_dia(self): # Normal
     initial_time = datetime(2015,2,18,0,0)
     final_time = datetime(2015,2,19,0,0)
     rate = TarifaHorayFraccion(tarifa = 2)
     self.assertEqual(rate.calcularPrecio(initial_time,final_time),48)
开发者ID:Arleyn,项目名称:Sage-Edwin,代码行数:5,代码来源:tests_tarifa_hora_fraccion.py

示例6: test_tarifa_hora_y_fraccion_una_hora_mas_media_hora_mas_1_minuto

 def test_tarifa_hora_y_fraccion_una_hora_mas_media_hora_mas_1_minuto(self):
     initial_time = datetime(2015,2,18,15,15)
     final_time = datetime(2015,2,18,16,46)
     rate = TarifaHorayFraccion(tarifa = 2)
     self.assertEqual(rate.calcularPrecio(initial_time,final_time),4)
开发者ID:Arleyn,项目名称:Sage-Edwin,代码行数:5,代码来源:tests_tarifa_hora_fraccion.py

示例7: test_tarifa_hora_y_fraccion_una_hora_fraccion_15_minutos

 def test_tarifa_hora_y_fraccion_una_hora_fraccion_15_minutos(self):
     initial_time = datetime(2015,2,18,19,0)
     final_time = datetime(2015,2,18,20,15)
     rate = TarifaHorayFraccion(tarifa = 1)
     self.assertEqual(rate.calcularPrecio(initial_time,final_time),1.5)
开发者ID:Arleyn,项目名称:Sage-Edwin,代码行数:5,代码来源:tests_tarifa_hora_fraccion.py

示例8: test_tarifa_hora_y_fraccion_una_hora_mas_media_hora

 def test_tarifa_hora_y_fraccion_una_hora_mas_media_hora(self):
     initial_time = datetime(2015,2,18,13,0)
     final_time = datetime(2015,2,18,14,30)
     rate = TarifaHorayFraccion(tarifa = 20)
     self.assertEqual(rate.calcularPrecio(initial_time,final_time),30)
开发者ID:Arleyn,项目名称:Sage-Edwin,代码行数:5,代码来源:tests_tarifa_hora_fraccion.py

示例9: test_tarifa_hora_y_fraccion_media_hora

 def test_tarifa_hora_y_fraccion_media_hora(self):
     initial_time = datetime(2015,2,18,13,15)
     final_time = datetime(2015,2,18,13,45)
     rate = TarifaHorayFraccion(tarifa = 2)
     self.assertEqual(rate.calcularPrecio(initial_time,final_time),2)
开发者ID:Arleyn,项目名称:Sage-Edwin,代码行数:5,代码来源:tests_tarifa_hora_fraccion.py

示例10: test_tarifa_hora_y_fraccion_una_dos_horas

 def test_tarifa_hora_y_fraccion_una_dos_horas(self):
     initial_time = datetime(2015,2,18,13,0)
     final_time = datetime(2015,2,18,15,0)
     rate = TarifaHorayFraccion(tarifa = 2)
     self.assertEqual(rate.calcularPrecio(initial_time,final_time),4)
开发者ID:Arleyn,项目名称:Sage-Edwin,代码行数:5,代码来源:tests_tarifa_hora_fraccion.py

示例11: test_tarifa_hora_y_fraccion_siete_dias

 def test_tarifa_hora_y_fraccion_siete_dias(self): # Esquina
     initial_time = datetime(2015,2,18,6,30)
     final_time = datetime(2015,2,25,6,30)
     rate = TarifaHorayFraccion(tarifa = 2)
     self.assertEqual(rate.calcularPrecio(initial_time,final_time),7*24*2)
开发者ID:Arleyn,项目名称:Sage-Edwin,代码行数:5,代码来源:tests_tarifa_hora_fraccion.py

示例12: test_tarifa_hora_y_fraccion_un_dia_antes_de_la_medianoche_mas_un_minuto

 def test_tarifa_hora_y_fraccion_un_dia_antes_de_la_medianoche_mas_un_minuto(self):
     initial_time = datetime(2015,2,18,23,59)
     final_time = datetime(2015,2,20,0,0)
     rate = TarifaHorayFraccion(tarifa_carros = 2)
     self.assertEqual(rate.calcularPrecio(initial_time,final_time,'Carro'),49)
开发者ID:Soft-Gear,项目名称:SAGE,代码行数:5,代码来源:tests_tarifa_hora_fraccion.py

示例13: test_tarifa_hora_y_fraccion_un_dia_mas_media_hora

 def test_tarifa_hora_y_fraccion_un_dia_mas_media_hora(self):
     initial_time = datetime(2015,2,18,0,0)
     final_time = datetime(2015,2,19,0,30)
     rate = TarifaHorayFraccion(tarifa_carros = 2)
     self.assertEqual(rate.calcularPrecio(initial_time,final_time,'Carro'),49)
开发者ID:Soft-Gear,项目名称:SAGE,代码行数:5,代码来源:tests_tarifa_hora_fraccion.py

示例14: test_tipo_tarifa_correcta

 def test_tipo_tarifa_correcta(self): # Cobertura
     rate=TarifaHorayFraccion(tarifa_carros=1)
     self.assertEqual(rate.tipo(),"Por Hora y Fraccion")
开发者ID:Soft-Gear,项目名称:SAGE,代码行数:3,代码来源:tests_tarifa_hora_fraccion.py

示例15: test_tarifa_hora_y_fraccion_dos_dias_mas_un_minuto

 def test_tarifa_hora_y_fraccion_dos_dias_mas_un_minuto(self):
     initial_time = datetime(2015,2,18,6,30)
     final_time = datetime(2015,2,20,6,31)
     rate = TarifaHorayFraccion(tarifa_carros = 2)
     self.assertEqual(rate.calcularPrecio(initial_time,final_time,'Carro'),97)
开发者ID:Soft-Gear,项目名称:SAGE,代码行数:5,代码来源:tests_tarifa_hora_fraccion.py


注:本文中的estacionamientos.models.TarifaHorayFraccion类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。