fix last test

This commit is contained in:
stvnrlly
2022-11-28 14:01:51 -05:00
parent 77c0faf4e5
commit ca135e32e8
2 changed files with 20 additions and 12 deletions

View File

@@ -2,8 +2,9 @@ from datetime import datetime, timedelta
from itertools import groupby
from operator import itemgetter
from statistics import mean
import pytz
from flask import render_template
from flask import current_app, render_template
from notifications_utils.timezones import convert_utc_to_local_timezone
from app import performance_dashboard_api_client, status_api_client
@@ -13,8 +14,8 @@ from app.main import main
@main.route("/performance")
def performance():
stats = performance_dashboard_api_client.get_performance_dashboard_stats(
start_date=(convert_utc_to_local_timezone(datetime.utcnow()) - timedelta(days=7)).date(),
end_date=convert_utc_to_local_timezone(datetime.utcnow()).date(),
start_date=(datetime.now(pytz.timezone(current_app.config['TIMEZONE'])) - timedelta(days=7)).date(),
end_date=datetime.now(pytz.timezone(current_app.config['TIMEZONE'])).date(),
)
stats['organisations_using_notify'] = sorted(
[