From 332c1088c0d3587d3cf14e38a54281b189b7872b Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Thu, 29 Sep 2022 11:42:50 +0200 Subject: [PATCH] Fix can't compare offset-naive and offset-aware datetimes --- tests/test_device.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_device.py b/tests/test_device.py index f422c653..e2b1f078 100644 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -1,6 +1,7 @@ import copy import datetime import pytest +import pytz from uuid import UUID from flask import g @@ -570,7 +571,7 @@ def test_manufacturer(user: UserClient): m, r = user.get(res='Manufacturer', query=[('search', 'asus')]) assert m == {'items': [{'name': 'Asus', 'url': 'https://en.wikipedia.org/wiki/Asus'}]} assert r.cache_control.public - assert r.expires > datetime.datetime.now() + assert r.expires.timestamp() > datetime.datetime.now().timestamp() @pytest.mark.mvp