mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-28 07:10:04 +02:00
changes for linter
This commit is contained in:
parent
9da326be16
commit
248dd4adfc
6 changed files with 33 additions and 16 deletions
|
@ -25,6 +25,7 @@ from datetime import date, datetime, timedelta
|
|||
from django.utils import timezone
|
||||
from .common import less_console_noise
|
||||
|
||||
|
||||
class CsvReportsTest(TestCase):
|
||||
"""Tests to determine if we are uploading our reports correctly"""
|
||||
|
||||
|
@ -124,6 +125,7 @@ class CsvReportsTest(TestCase):
|
|||
|
||||
def side_effect(Bucket, Key):
|
||||
raise ClientError({"Error": {"Code": "NoSuchKey", "Message": "No such key"}}, "get_object")
|
||||
|
||||
with less_console_noise():
|
||||
mock_client = MagicMock()
|
||||
mock_client.get_object.side_effect = side_effect
|
||||
|
@ -145,6 +147,7 @@ class CsvReportsTest(TestCase):
|
|||
|
||||
def side_effect(Bucket, Key):
|
||||
raise ClientError({"Error": {"Code": "NoSuchKey", "Message": "No such key"}}, "get_object")
|
||||
|
||||
with less_console_noise():
|
||||
mock_client = MagicMock()
|
||||
mock_client.get_object.side_effect = side_effect
|
||||
|
@ -524,8 +527,8 @@ class ExportDataTest(MockEppLib):
|
|||
# Create a CSV file in memory
|
||||
csv_file = StringIO()
|
||||
writer = csv.writer(csv_file)
|
||||
# We use timezone.make_aware to sync to server time a datetime object with the current date (using date.today())
|
||||
# and a specific time (using datetime.min.time()).
|
||||
# We use timezone.make_aware to sync to server time a datetime object with the current date
|
||||
# (using date.today()) and a specific time (using datetime.min.time()).
|
||||
end_date = timezone.make_aware(datetime.combine(date.today() + timedelta(days=2), datetime.min.time()))
|
||||
start_date = timezone.make_aware(datetime.combine(date.today() - timedelta(days=2), datetime.min.time()))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue