Exemple #1
0
 def get_stat_by_registered_user(self, start_date, end_date):
     """
     Queries the tours from the database, then returns a tuple that contains labels and data, which are
     required to display the carts.
     :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
     """
     tours = StatisticDAO.get_tours(start_date, end_date)
     labels = [str(name) for (name, count) in tours]
     data = [count for (name, count) in tours]
     return labels, data
Exemple #2
0
 def get_stat_by_tourguide_popularity(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 popularity of the tour guide.
     :param start_date:
     :param end_date:
     :return: a tuple that contains: labels, data
     """
     tourguides = StatisticDAO.get_static_from_tour_guide_popularity(start_date, end_date)
     labels = [str(name) for (name, count) in tourguides]
     data = [count for (name, count) in tourguides]
     return labels, data
Exemple #3
0
 def test_ordered_list_from_tour_guide_tours_popularity(self):
     print("Statistic3 list: ")
     print(
         StatisticDAO.get_static_from_tour_guide_popularity(
             "2015-09-01", "2016-10-01"))
     self.assertEquals(True, True)
Exemple #4
0
 def test_ordered_list_from_tour_registrations(self):
     print("Ordered list: ")
     print(StatisticDAO.get_tours("2016-09-01", "2016-10-01"))
     self.assertEquals(True, True)
 def test_ordered_list_from_tour_guide_tours_popularity(self):
     print("Statistic3 list: ")
     print(StatisticDAO.get_static_from_tour_guide_popularity("2015-09-01", "2016-10-01"))
     self.assertEquals(True, True)
 def test_ordered_list_from_tour_registrations(self):
     print("Ordered list: ")
     print(StatisticDAO.get_tours("2016-09-01", "2016-10-01"))
     self.assertEquals(True, True)