From 4a147a50b77e398f02c46da46cb16ff8a5dd69b4 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 9 Dec 2020 12:05:22 +0100 Subject: [PATCH] fixing test --- tests/test_action.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_action.py b/tests/test_action.py index 09c60c05..c81491e4 100644 --- a/tests/test_action.py +++ b/tests/test_action.py @@ -3,6 +3,7 @@ import copy import pytest from datetime import datetime, timedelta +from dateutil.tz import tzutc from decimal import Decimal from typing import Tuple, Type @@ -556,8 +557,8 @@ def test_deallocate_bad_dates(user: UserClient): """ Tests deallocate with bad date of start_time """ snapshot, _ = user.post(file('basic.snapshot'), res=models.Snapshot) device_id = snapshot['device']['id'] - delta = timedelta(days=30) - future = datetime.now() + delta + delay = timedelta(days=30) + future = datetime.now().replace(tzinfo=tzutc()) + delay post_deallocate = {"startTime": future, "devices": [device_id] }