Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Eric Zheng
slapos.core
Commits
6cda94e8
Commit
6cda94e8
authored
Nov 29, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test specific functionality of SPL alarm.
parent
8324e906
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
+26
-6
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingAlarm.py
..._accounting/TestTemplateItem/testSlapOSAccountingAlarm.py
+25
-5
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
No files found.
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingAlarm.py
View file @
6cda94e8
...
...
@@ -1368,14 +1368,16 @@ class TestSlapOSManageBuildingCalculatingDeliveryAlarm(testSlapOSMixin):
self
.
_test_Delivery_manageBuildingCalculatingDelivery
(
'diverged'
,
True
)
class
TestSlapOSConfirmedDeliveryMixin
(
testSlapOSMixin
):
def
_test
(
self
,
simulation_state
,
causality_state
,
specialise
,
positive
):
def
_test
(
self
,
simulation_state
,
causality_state
,
specialise
,
positive
,
delivery_date
=
DateTime
(
'2012/04/22'
),
accounting_date
=
DateTime
(
'2012/04/28'
)):
@
simulateByTitlewMark
(
self
.
script
)
def
_real
(
self
,
simulation_state
,
causality_state
,
specialise
,
positive
):
def
_real
(
self
,
simulation_state
,
causality_state
,
specialise
,
positive
,
delivery_date
,
accounting_date
):
not_visited
=
'Not visited by %s'
%
self
.
script
visited
=
'Visited by %s'
%
self
.
script
module
=
self
.
portal
.
getDefaultModule
(
portal_type
=
self
.
portal_type
)
delivery_date
=
DateTime
(
'2012/04/22'
)
accounting_date
=
DateTime
(
'2012/04/28'
)
delivery
=
module
.
newContent
(
title
=
not_visited
,
start_date
=
delivery_date
,
portal_type
=
self
.
portal_type
,
specialise
=
specialise
)
_jumpToStateFor
=
self
.
portal
.
portal_workflow
.
_jumpToStateFor
...
...
@@ -1391,7 +1393,8 @@ class TestSlapOSConfirmedDeliveryMixin(testSlapOSMixin):
self
.
assertEqual
(
visited
,
delivery
.
getTitle
())
else
:
self
.
assertEqual
(
not_visited
,
delivery
.
getTitle
())
_real
(
self
,
simulation_state
,
causality_state
,
specialise
,
positive
)
_real
(
self
,
simulation_state
,
causality_state
,
specialise
,
positive
,
delivery_date
,
accounting_date
)
def
test_typical
(
self
):
self
.
_test
(
'confirmed'
,
'solved'
,
...
...
@@ -1462,6 +1465,23 @@ class TestSlapOSDeliverConfirmedAggregatedSalePackingListAlarm(
portal_type
=
'Sale Packing List'
alarm
=
'slapos_deliver_confirmed_aggregated_sale_packing_list'
def
test_previous_month
(
self
):
self
.
_test
(
'confirmed'
,
'solved'
,
'sale_trade_condition_module/slapos_aggregated_trade_condition'
,
True
,
delivery_date
=
DateTime
(
"2012/03/22"
),
accounting_date
=
DateTime
(
'2012/04/28'
))
def
test_next_month
(
self
):
self
.
_test
(
'confirmed'
,
'solved'
,
'sale_trade_condition_module/slapos_aggregated_trade_condition'
,
False
,
delivery_date
=
DateTime
(
"2012/05/22"
),
accounting_date
=
DateTime
(
'2012/04/28'
))
def
test_same_month_early
(
self
):
self
.
_test
(
'confirmed'
,
'solved'
,
'sale_trade_condition_module/slapos_aggregated_trade_condition'
,
False
,
delivery_date
=
DateTime
(
"2012/04/22"
),
accounting_date
=
DateTime
(
'2012/04/23'
))
class
TestSlapOSStopConfirmedAggregatedSaleInvoiceTransactionAlarm
(
TestSlapOSConfirmedDeliveryMixin
):
...
...
master/bt5/slapos_accounting/bt/revision
View file @
6cda94e8
184
\ No newline at end of file
185
\ No newline at end of file
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