Skip to content

Commit

Permalink
Merge branch 'master' into email_vars_extend
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico committed Nov 14, 2023
2 parents e179ae7 + cad610d commit 5cbbb79
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 21 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
path: |
~/.cache/pip
eggs
.tox
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
Expand Down
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,12 @@
extras_require={
"test": [
"plone.app.testing",
# Plone KGS does not use this version, because it would break
# Remove if your package shall be part of coredev.
# plone_coredev tests as of 2016-04-01.
"plone.testing>=5.0.0",
"plone.app.contenttypes",
"plone.app.robotframework[debug]",
"collective.MockMailHost",
"redturtle.prenotazioni[test]",
"design.plone.policy[test]",
"redturtle.prenotazioni",
"design.plone.policy",
],
},
entry_points="""
Expand Down
13 changes: 10 additions & 3 deletions src/design/plone/ioprenoto/tests/test_custom_booking_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,23 @@ def setUp(self):
title="Prenota foo",
description="",
daData=date.today(),
booking_types=[
{"name": "Type A", "duration": "30"},
],
gates=["Gate A"],
required_booking_fields=["email", "fiscalcode"],
)
week_table = self.folder_prenotazioni.week_table
week_table[0]["morning_start"] = "0700"
week_table[0]["morning_end"] = "1000"
self.folder_prenotazioni.week_table = week_table
api.content.transition(
obj=api.content.create(
type="PrenotazioneType",
title="Type A",
duration=30,
container=self.folder_prenotazioni,
gates=["all"],
),
transition="publish",
)

year = api.content.create(
container=self.folder_prenotazioni, type="PrenotazioniYear", title="Year"
Expand Down
13 changes: 10 additions & 3 deletions src/design/plone/ioprenoto/tests/test_prenotazione_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,23 @@ def setUp(self):
title="Prenota foo",
description="",
daData=date.today(),
booking_types=[
{"name": "Type A", "duration": "30"},
],
gates=["Gate A"],
)
week_table = self.folder_prenotazioni.week_table
for row in week_table:
row["morning_start"] = "0700"
row["morning_end"] = "1000"
self.folder_prenotazioni.week_table = week_table
api.content.transition(
obj=api.content.create(
type="PrenotazioneType",
title="Type A",
duration=30,
container=self.folder_prenotazioni,
gates=["all"],
),
transition="publish",
)
api.content.transition(obj=self.folder_prenotazioni, transition="publish")
transaction.commit()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,18 @@ def setUp(self):
to_id=queryUtility(IIntIds).getId(self.unita_organizzativa)
)
],
booking_types=[
{"name": "Type A", "duration": "30"},
],
)
api.content.transition(
obj=api.content.create(
type="PrenotazioneType",
title="Type A",
duration=30,
container=self.prenotazioni_folder,
gates=["all"],
),
transition="publish",
)

self.prenotazioni_folder2 = api.content.create(
container=self.portal,
type="PrenotazioniFolder",
Expand All @@ -88,10 +96,26 @@ def setUp(self):
to_id=queryUtility(IIntIds).getId(self.unita_organizzativa)
)
],
booking_types=[
{"name": "Type A", "duration": "10"},
{"name": "Type B", "duration": "30"},
],
)
api.content.transition(
obj=api.content.create(
type="PrenotazioneType",
title="Type A",
duration=10,
container=self.prenotazioni_folder2,
gates=["all"],
),
transition="publish",
)
api.content.transition(
obj=api.content.create(
type="PrenotazioneType",
title="Type B",
duration=30,
container=self.prenotazioni_folder2,
gates=["all"],
),
transition="publish",
)
self.prenotazioni_folder3 = api.content.create(
container=self.portal,
Expand Down
13 changes: 10 additions & 3 deletions src/design/plone/ioprenoto/tests/test_stringinterp_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,22 @@ def setUp(self):
title="Prenota foo",
description="",
daData=date.today(),
booking_types=[
{"name": "Type A", "duration": "30"},
],
gates=["Gate A"],
)
week_table = self.folder_prenotazioni.week_table
week_table[0]["morning_start"] = "0700"
week_table[0]["morning_end"] = "1000"
self.folder_prenotazioni.week_table = week_table
api.content.transition(
obj=api.content.create(
type="PrenotazioneType",
title="Type A",
duration=30,
container=self.folder_prenotazioni,
gates=["all"],
),
transition="publish",
)

year = api.content.create(
container=self.folder_prenotazioni,
Expand Down

0 comments on commit 5cbbb79

Please sign in to comment.