Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
9d426672
Commit
9d426672
authored
Jan 18, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
periodicity: test get{Month,Week}DayItemList
parent
e027e578
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testAlarm.py
...TestTemplateItem/portal_components/test.erp5.testAlarm.py
+37
-0
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testAlarm.py
View file @
9d426672
...
...
@@ -593,3 +593,40 @@ class TestPeriodicity(AlarmTestCase):
self
.
tic
()
alarm
.
setNextAlarmDate
(
current_date
=
date
)
self
.
assertEqual
(
alarm
.
getAlarmDate
(),
date
)
def
test_week_day_item_list
(
self
):
alarm
=
self
.
newAlarm
()
self
.
assertEqual
(
[(
label
.
message
,
label
.
domain
,
value
)
for
(
label
,
value
)
in
alarm
.
getWeekDayItemList
()],
[
(
'Sunday'
,
'erp5_ui'
,
'Sunday'
),
(
'Monday'
,
'erp5_ui'
,
'Monday'
),
(
'Tuesday'
,
'erp5_ui'
,
'Tuesday'
),
(
'Wednesday'
,
'erp5_ui'
,
'Wednesday'
),
(
'Thursday'
,
'erp5_ui'
,
'Thursday'
),
(
'Friday'
,
'erp5_ui'
,
'Friday'
),
(
'Saturday'
,
'erp5_ui'
,
'Saturday'
),
],
)
def
test_month_item_list
(
self
):
alarm
=
self
.
newAlarm
()
self
.
assertEqual
(
[(
label
.
message
,
label
.
domain
,
value
)
for
(
label
,
value
)
in
alarm
.
getMonthItemList
()],
[
(
'January'
,
'erp5_ui'
,
1
),
(
'February'
,
'erp5_ui'
,
2
),
(
'March'
,
'erp5_ui'
,
3
),
(
'April'
,
'erp5_ui'
,
4
),
(
'May'
,
'erp5_ui'
,
5
),
(
'June'
,
'erp5_ui'
,
6
),
(
'July'
,
'erp5_ui'
,
7
),
(
'August'
,
'erp5_ui'
,
8
),
(
'September'
,
'erp5_ui'
,
9
),
(
'October'
,
'erp5_ui'
,
10
),
(
'November'
,
'erp5_ui'
,
11
),
(
'December'
,
'erp5_ui'
,
12
),
],
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment