statistics code/test code
On my machine tests crash (see: https://git-r3lab.uni.lu/piotr.atyjaszyk/scheduling-system/commit/d571b4cc9075e20a2bfea92b093758ae1f4ae66e#note_5027).
======================================================================
ERROR: test_get_statistics_for_month_one_appointment (web.tests.test_statistics.TestStatistics)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\piotr.gawron\workspace\scheduling-system\smash\web\tests\test_statistics.py", line 34, in test_get_statistics_for_month_one_appointment
statistics = self.statistics_manager.get_statistics_for_month(self.now.month - 1, self.now.year)
File "C:\Users\piotr.gawron\workspace\scheduling-system\smash\web\statistics.py", line 88, in get_statistics_for_month
number_of_appointments = self._get_number_of_appointments(filters_month_year_appointments, visit, month, year)
File "C:\Users\piotr.gawron\workspace\scheduling-system\smash\web\statistics.py", line 165, in _get_number_of_appointments
return self._get_count_from_filters_or_sql(Appointment, filters, QUERY_APPOINTMENTS_COUNT, visit, month, year)
File "C:\Users\piotr.gawron\workspace\scheduling-system\smash\web\statistics.py", line 153, in _get_count_from_filters_or_sql
count = model.objects.filter(filters).count()
File "C:\Python27\lib\site-packages\django\db\models\query.py", line 369, in count
return self.query.get_count(using=self.db)
File "C:\Python27\lib\site-packages\django\db\models\sql\query.py", line 476, in get_count
number = obj.get_aggregation(using, ['__count'])['__count']
File "C:\Python27\lib\site-packages\django\db\models\sql\query.py", line 457, in get_aggregation
result = compiler.execute_sql(SINGLE)
File "C:\Python27\lib\site-packages\django\db\models\sql\compiler.py", line 835, in execute_sql
cursor.execute(sql, params)
File "C:\Python27\lib\site-packages\django\db\backends\utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "C:\Python27\lib\site-packages\django\db\utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "C:\Python27\lib\site-packages\django\db\backends\utils.py", line 64, in execute
return self.cursor.execute(sql, params)
DataError: time zone "Central European Standard Time" not recognized