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
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)
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)