Fix can't compare offset-naive and offset-aware datetimes

This commit is contained in:
Santiago L 2022-09-29 11:42:50 +02:00
parent 7bae66e041
commit 332c1088c0

View file

@ -1,6 +1,7 @@
import copy import copy
import datetime import datetime
import pytest import pytest
import pytz
from uuid import UUID from uuid import UUID
from flask import g from flask import g
@ -570,7 +571,7 @@ def test_manufacturer(user: UserClient):
m, r = user.get(res='Manufacturer', query=[('search', 'asus')]) m, r = user.get(res='Manufacturer', query=[('search', 'asus')])
assert m == {'items': [{'name': 'Asus', 'url': 'https://en.wikipedia.org/wiki/Asus'}]} assert m == {'items': [{'name': 'Asus', 'url': 'https://en.wikipedia.org/wiki/Asus'}]}
assert r.cache_control.public assert r.cache_control.public
assert r.expires > datetime.datetime.now() assert r.expires.timestamp() > datetime.datetime.now().timestamp()
@pytest.mark.mvp @pytest.mark.mvp