mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-02 17:48:36 -04:00
remove pytz remnants
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import json
|
||||
import uuid
|
||||
from datetime import datetime, timedelta
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
import pytest
|
||||
import pytz
|
||||
import requests_mock
|
||||
from flask import current_app, url_for
|
||||
from sqlalchemy import delete, select
|
||||
@@ -988,4 +988,4 @@ def admin_request(client):
|
||||
|
||||
|
||||
def datetime_in_past(days=0, seconds=0):
|
||||
return datetime.now(tz=pytz.utc) - timedelta(days=days, seconds=seconds)
|
||||
return datetime.now(tz=ZoneInfo.UTC) - timedelta(days=days, seconds=seconds)
|
||||
|
||||
@@ -2,9 +2,9 @@ import json
|
||||
import uuid
|
||||
from datetime import date, datetime, timedelta
|
||||
from unittest.mock import ANY
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
import pytest
|
||||
import pytz
|
||||
from freezegun import freeze_time
|
||||
|
||||
import app.celery.tasks
|
||||
@@ -183,7 +183,7 @@ def test_create_scheduled_job(client, sample_template, mocker, fake_uuid):
|
||||
assert resp_json["data"]["id"] == fake_uuid
|
||||
assert (
|
||||
resp_json["data"]["scheduled_for"]
|
||||
== datetime(2016, 1, 5, 11, 59, 0, tzinfo=pytz.UTC).isoformat()
|
||||
== datetime(2016, 1, 5, 11, 59, 0, tzinfo=ZoneInfo.UTC).isoformat()
|
||||
)
|
||||
assert resp_json["data"]["job_status"] == JobStatus.SCHEDULED
|
||||
assert resp_json["data"]["template"] == str(sample_template.id)
|
||||
|
||||
Reference in New Issue
Block a user