diff --git a/src/paperless_tika/tests/test_tika_parser.py b/src/paperless_tika/tests/test_tika_parser.py index 8ba8e0e79..a1fa258a2 100644 --- a/src/paperless_tika/tests/test_tika_parser.py +++ b/src/paperless_tika/tests/test_tika_parser.py @@ -3,6 +3,11 @@ import os from pathlib import Path from unittest import mock +try: + import zoneinfo +except ImportError: + from backports import zoneinfo + from django.test import TestCase from django.test import override_settings from httpx import Request @@ -44,7 +49,10 @@ class TestTikaParser(HttpxMockMixin, TestCase): with open(self.parser.archive_path, "rb") as f: self.assertEqual(f.read(), b"PDF document") - self.assertEqual(self.parser.date, datetime.datetime(2020, 11, 21)) + self.assertEqual( + self.parser.date, + datetime.datetime(2020, 11, 21, tzinfo=zoneinfo.ZoneInfo("UTC")), + ) def test_metadata(self): self.httpx_mock.add_response(