mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Fixes the timezone value in a test
This commit is contained in:
parent
7bd5c010a1
commit
fcfc705b87
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user