Ejemplo n.º 1
0
 def get_stat_by_tourguide(self, start_date, end_date):
     """
     Queries the tour guides from the database, then returns a tuple that contains labels and data, which are
     required to display the charts. The data is represents the cardinality of the guided tours.
     :param start_date: the begin of the time interval
     :param end_date: the end of the time interval
     :return: a tuple that contains: labels, data
     """
     tourguides = StatisticDAO.get_static_from_tour_guide(start_date, end_date)
     labels = [str(name) for (name, count) in tourguides]
     data = [count for (name, count) in tourguides]
     return labels, data
Ejemplo n.º 2
0
 def test_ordered_list_from_tour_guide_tours(self):
     print("Statistic2 list: ")
     print(
         StatisticDAO.get_static_from_tour_guide("2015-09-01",
                                                 "2016-10-01"))
     self.assertEquals(True, True)
Ejemplo n.º 3
0
 def test_ordered_list_from_tour_guide_tours(self):
     print("Statistic2 list: ")
     print(StatisticDAO.get_static_from_tour_guide("2015-09-01", "2016-10-01"))
     self.assertEquals(True, True)