mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-02 04:39:25 -04:00
Fixed linting errors, removed pytz
This commit is contained in:
@@ -29,7 +29,7 @@ def get_report_info(service_id, report_name):
|
||||
size_str = f"{size_bytes / (1024 * 1024):.1f} MB"
|
||||
return {"available": True, "size": size_str}
|
||||
except Exception:
|
||||
pass
|
||||
return {"available": False, "size": None}
|
||||
return {"available": False, "size": None}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from datetime import datetime
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
import pytz
|
||||
from flask import (
|
||||
Response,
|
||||
current_app,
|
||||
@@ -158,7 +158,7 @@ def download_notifications_csv(service_id):
|
||||
service_data_retention_days = current_service.get_days_of_retention(
|
||||
filter_args.get("message_type")[0], number_of_days
|
||||
)
|
||||
user_tz = pytz.timezone(get_user_preferred_timezone())
|
||||
user_tz = ZoneInfo(get_user_preferred_timezone())
|
||||
file_time = datetime.now(user_tz).strftime("%Y-%m-%d %I:%M:%S %p")
|
||||
file_time = f"{file_time} {get_user_preferred_timezone()}"
|
||||
|
||||
|
||||
@@ -35,7 +35,9 @@ def test_should_200_for_tour_start(
|
||||
)
|
||||
|
||||
# Find the tour step button specifically, not just any usa-button
|
||||
tour_buttons = [btn for btn in page.select("a.usa-button") if "tour" in btn.get("href", "")]
|
||||
tour_buttons = [
|
||||
btn for btn in page.select("a.usa-button") if "tour" in btn.get("href", "")
|
||||
]
|
||||
assert len(tour_buttons) > 0, "No tour button found"
|
||||
assert tour_buttons[0]["href"] == url_for(
|
||||
".tour_step", service_id=SERVICE_ONE_ID, template_id=fake_uuid, step_index=1
|
||||
|
||||
Reference in New Issue
Block a user