def testQueryAndSaveAlternatives(self):
    trip_iter = self.pipeline.get_trips_for_alternatives(self.testUUID)
    self.assertTrue(hasattr(trip_iter, '__iter__'))
    trip_list = list(trip_iter)
    for trip in trip_list:
        query.obtain_alternatives(trip.trip_id, self.testUUID)
    firstElement = trip_list[0]
    self.assertTrue(isinstance(firstElement, ecwt.E_Mission_Trip))

    for trip in trip_list:
        alt_it = pipeline_module.get_alternative_for_trip(trip)
        alt_list = list(alt_it)
Exemple #2
0
    def testQueryAndSaveAlternatives(self):
        trip_iter = self.pipeline.get_trips_for_alternatives(self.testUUID)
        self.assertTrue(hasattr(trip_iter, '__iter__'))
        trip_list = list(trip_iter)
        for trip in trip_list:
            query.obtain_alternatives(trip.trip_id, self.testUUID)
        firstElement = trip_list[0]
        self.assertTrue(isinstance(firstElement, ecwt.E_Mission_Trip))

        for trip in trip_list:
            alt_it = pipeline_module.get_alternative_for_trip(trip)
            alt_list = list(alt_it)
    def testQueryAndSaveAlternatives(self):
        trip_iter = self.pipeline.get_trips_for_alternatives(self.testUUID)
        self.assertTrue(hasattr(trip_iter, "__iter__"))
        trip_list = list(trip_iter)
        for trip in trip_list:
            query.obtain_alternatives(trip.trip_id, self.testUUID)
        firstElement = trip_list[0]
        self.assertTrue(isinstance(firstElement, ecwt.E_Mission_Trip))

        for trip in trip_list:
            alt_it = pipeline_module.get_alternative_for_trip(trip)
            alt_list = list(alt_it)
            # TODO: Figure out why we sometimes have three alternatives and sometimes have 4.
            # We are querying for 4 alternatives in the code, so why don't we have all four
            self.assertTrue(len(alt_list) == 3 or len(alt_list) == 4)