Skip to content

Commit

Permalink
run black
Browse files Browse the repository at this point in the history
  • Loading branch information
erral committed Sep 12, 2024
1 parent 631baff commit 921e4c3
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/plone/restapi/tests/test_serializer_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,18 +211,22 @@ def test_dx_type_summary(self):
summary,
)


class TestSummarySerializerswithRecurrenceObjects(unittest.TestCase):
layer = PLONE_RESTAPI_DX_INTEGRATION_TESTING
layer = PLONE_RESTAPI_DX_INTEGRATION_TESTING

def setUp(self):
self.portal = self.layer["portal"]
self.request = self.layer["request"]

pushGlobalRegistry(getSite())
register_static_uuid_utility(prefix="c6dcbd55ab2746e199cd4ed458")

behaviors = self.portal.portal_types.DXTestDocument.behaviors
behaviors = behaviors + ('plone.eventbasic', 'plone.eventrecurrence',)
behaviors = behaviors + (
"plone.eventbasic",
"plone.eventrecurrence",
)
self.portal.portal_types.DXTestDocument.behaviors = behaviors

self.event = createContentInContainer(
Expand All @@ -233,7 +237,7 @@ def setUp(self):
description="Description event",
start=datetime.now(),
end=datetime.now() + timedelta(hours=1),
recurrence="RRULE:FREQ=DAILY;COUNT=3" # see https://github.com/plone/plone.app.event/blob/master/plone/app/event/tests/base_setup.py
recurrence="RRULE:FREQ=DAILY;COUNT=3", # see https://github.com/plone/plone.app.event/blob/master/plone/app/event/tests/base_setup.py
)

alsoProvides(self.event, IEvent)
Expand All @@ -244,9 +248,9 @@ def tearDown(self):

def test_dx_event_with_recurrence(self):
tomorrow = datetime.now() + timedelta(days=1)
tomorrow_str = tomorrow.strftime('%Y-%m-%d')
tomorrow_str = tomorrow.strftime("%Y-%m-%d")
ot = OccurrenceTraverser(self.event, self.request)
ocurrence = ot.publishTraverse(self.request, tomorrow_str)
summary = getMultiAdapter((ocurrence, self.request), ISerializeToJsonSummary)()

self.assertEqual(summary, {})

0 comments on commit 921e4c3

Please sign in to comment.