Beispiel #1
0
 def validStopTest(self):
     """
     Prueba que valida parada
     """
     companyTemp = Empresa(nombre="company", mail="*****@*****.**")
     routeTemp = Recorrido(linea="route1",
                           empresa=companyTemp,
                           predictable=True)
     stopTemp = Parada(orden=1,
                       latitud=37.2,
                       longitud=30.1,
                       linea=routeTemp,
                       calle1="calle1",
                       calle2="calle2")
     self.assertTrue(stopTemp.validate())
Beispiel #2
0
 def notValidLonStopTest(self):
     """
     Prueba que verifica parada longitud no valida
     """
     companyTemp = Empresa(nombre="company", mail="*****@*****.**")
     routeTemp = Recorrido(linea="route1",
                           empresa=companyTemp,
                           predictable=True)
     stopTemp = Parada(orden=1,
                       latitud=37.2,
                       longitud=230.1,
                       linea=routeTemp,
                       calle1="calle1",
                       calle2="calle2",
                       paradaactiva=True)
     self.assertFalse(stopTemp.validate())
Beispiel #3
0
 def emptyStreetStopTest2(self):
     """
     Prueba que verifica descripcion de parada vacia
     """
     companyTemp = Empresa(nombre="company", mail="*****@*****.**")
     routeTemp = Recorrido(linea="route1",
                           empresa=companyTemp,
                           predictable=True)
     stopTemp = Parada(orden=1,
                       latitud=37.2,
                       longitud=30.1,
                       linea=routeTemp,
                       calle1='',
                       calle2="calle2",
                       paradaactiva=True)
     self.assertFalse(stopTemp.validate())
Beispiel #4
0
 def twoStopTest(self):
     companyTemp = Empresa(nombre="company", mail="*****@*****.**")
     routeTemp = Recorrido(linea="route1",
                           empresa=companyTemp,
                           predictable=True)
     stopTemp1 = Parada(orden=2,
                        latitud=37.2,
                        longitud=30.1,
                        linea=routeTemp,
                        calle1="calle1",
                        calle2="calle2",
                        paradaactiva=True)
     stopTemp2 = Parada(orden=3,
                        latitud=37.2,
                        longitud=30.1,
                        linea=routeTemp,
                        calle1="calle1",
                        calle2="calle2",
                        paradaactiva=True)
     stopsList = [stopTemp1, stopTemp2]
     orderStopList(stopsList)
     self.assertEqual(stopsList[1].getOrder(), 2, "Falla")