fixing test

This commit is contained in:
Cayo Puigdefabregas 2020-12-09 12:05:22 +01:00
parent 68a8f70de4
commit 4a147a50b7

View file

@ -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]
}