Skip to content

Commit

Permalink
Remove pytz as test dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
thet committed Jun 19, 2024
1 parent 0719529 commit c09276c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions news/141.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Remove pytz as test dependency.
[thet]
5 changes: 2 additions & 3 deletions plone/app/caching/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from datetime import date
from datetime import datetime
from datetime import timedelta
from datetime import timezone
from plone.app.caching.interfaces import IPloneCacheSettings
from plone.app.caching.utils import getObjectDefaultView
from plone.app.caching.utils import isPurged
Expand All @@ -17,11 +18,9 @@
from zope.interface import implementer

import pkg_resources
import pytz
import unittest


TEST_TIMEZONE = "Europe/Vienna"
TEST_IMAGE = pkg_resources.resource_filename("plone.app.caching.tests", "test.gif")


Expand All @@ -32,7 +31,7 @@ def stable_now():
several tests compare this date with an Expires header,
and this header may be set to ten years ago.
"""
tzinfo = pytz.timezone(TEST_TIMEZONE)
tzinfo = timezone(timedelta(hours=1), "Europe/Vienna")
now = datetime.now() - timedelta(days=1000)
now = tzinfo.localize(now) # set tzinfo with correct DST offset
return now
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"plone.app.textfield",
"plone.behavior",
"plone.testing",
"pytz",
"transaction",
]
},
Expand Down

0 comments on commit c09276c

Please sign in to comment.