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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.core
Commits
ce453497
Commit
ce453497
authored
Nov 21, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Continue
43bb93dd
More things were destroyed in
7cec0b75
parent
34992293
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
111 deletions
+8
-111
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/HostingSubscription_requestUpdateOpenSaleOrder.xml
...unting/HostingSubscription_requestUpdateOpenSaleOrder.xml
+1
-0
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingAlarm.py
..._accounting/TestTemplateItem/testSlapOSAccountingAlarm.py
+6
-110
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/HostingSubscription_requestUpdateOpenSaleOrder.xml
View file @
ce453497
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
<value>
<string>
person = context.getDestinationSectionValue()\n
<value>
<string>
person = context.getDestinationSectionValue()\n
if person is not None:\n
if person is not None:\n
person.Person_storeOpenSaleOrderJournal()\n
person.Person_storeOpenSaleOrderJournal()\n
context.converge()\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
...
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingAlarm.py
View file @
ce453497
...
@@ -666,50 +666,10 @@ class TestOpenSaleOrderAlarm(testSlapOSMixin):
...
@@ -666,50 +666,10 @@ class TestOpenSaleOrderAlarm(testSlapOSMixin):
for
q
in
open_sale_order_template
.
getCategoryList
()]))
for
q
in
open_sale_order_template
.
getCategoryList
()]))
@
simulateHostingSubscription_requestUpdateOpenSaleOrder
@
simulateHostingSubscription_requestUpdateOpenSaleOrder
def
test_alarm_HS_
validat
ed
(
self
):
def
test_alarm_HS_
diverg
ed
(
self
):
subscription
=
self
.
portal
.
hosting_subscription_module
\
subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
subscription
.
edit
(
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
subscription
.
edit
(
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
subscription
,
'validated'
)
self
.
tic
()
self
.
portal
.
portal_alarms
\
.
slapos_request_update_hosting_subscription_open_sale_order
\
.
activeSense
()
self
.
tic
()
self
.
assertEqual
(
'Visited by HostingSubscription_requestUpdateOpenSaleOrder'
,
subscription
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
@
simulateHostingSubscription_requestUpdateOpenSaleOrder
def
test_alarm_HS_validated_OSO_invalidated
(
self
):
subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
subscription
.
edit
(
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
subscription
,
'validated'
)
open_sale_order
=
self
.
portal
.
open_sale_order_module
\
.
template_open_sale_order
.
Base_createCloneDocument
(
batch_mode
=
1
)
open_sale_order
.
edit
(
reference
=
'TESTOSO-%s'
%
self
.
generateNewId
())
open_sale_order
.
newContent
(
portal_type
=
'Open Sale Order Line'
,
aggregate
=
subscription
.
getRelativeUrl
())
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
open_sale_order
,
'invalidated'
)
self
.
tic
()
self
.
portal
.
portal_alarms
\
.
slapos_request_update_hosting_subscription_open_sale_order
\
.
activeSense
()
self
.
tic
()
self
.
assertEqual
(
'Visited by HostingSubscription_requestUpdateOpenSaleOrder'
,
subscription
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
@
simulateHostingSubscription_requestUpdateOpenSaleOrder
def
test_alarm_HS_archived
(
self
):
subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
subscription
.
edit
(
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
subscription
,
'archived'
)
self
.
tic
()
self
.
tic
()
self
.
portal
.
portal_alarms
\
self
.
portal
.
portal_alarms
\
...
@@ -720,75 +680,6 @@ class TestOpenSaleOrderAlarm(testSlapOSMixin):
...
@@ -720,75 +680,6 @@ class TestOpenSaleOrderAlarm(testSlapOSMixin):
'Visited by HostingSubscription_requestUpdateOpenSaleOrder'
,
'Visited by HostingSubscription_requestUpdateOpenSaleOrder'
,
subscription
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
subscription
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
@
simulateHostingSubscription_requestUpdateOpenSaleOrder
def
test_alarm_HS_archived_OSO_validated
(
self
):
subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
subscription
.
edit
(
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
subscription
,
'archived'
)
open_sale_order
=
self
.
portal
.
open_sale_order_module
\
.
template_open_sale_order
.
Base_createCloneDocument
(
batch_mode
=
1
)
open_sale_order
.
edit
(
reference
=
'TESTOSO-%s'
%
self
.
generateNewId
())
open_sale_order
.
newContent
(
portal_type
=
'Open Sale Order Line'
,
aggregate
=
subscription
.
getRelativeUrl
())
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
open_sale_order
,
'validated'
)
self
.
tic
()
self
.
portal
.
portal_alarms
\
.
slapos_request_update_hosting_subscription_open_sale_order
\
.
activeSense
()
self
.
tic
()
self
.
assertEqual
(
'Visited by HostingSubscription_requestUpdateOpenSaleOrder'
,
subscription
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
@
simulateHostingSubscription_requestUpdateOpenSaleOrder
def
test_alarm_HS_validated_OSO_validated
(
self
):
subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
subscription
.
edit
(
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
subscription
,
'validated'
)
open_sale_order
=
self
.
portal
.
open_sale_order_module
\
.
template_open_sale_order
.
Base_createCloneDocument
(
batch_mode
=
1
)
open_sale_order
.
edit
(
reference
=
'TESTOSO-%s'
%
self
.
generateNewId
())
open_sale_order
.
newContent
(
portal_type
=
'Open Sale Order Line'
,
aggregate
=
subscription
.
getRelativeUrl
())
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
open_sale_order
,
'validated'
)
self
.
tic
()
self
.
portal
.
portal_alarms
\
.
slapos_request_update_hosting_subscription_open_sale_order
\
.
activeSense
()
self
.
tic
()
self
.
assertNotEqual
(
'Visited by HostingSubscription_requestUpdateOpenSaleOrder'
,
subscription
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
@
simulateHostingSubscription_requestUpdateOpenSaleOrder
def
test_alarm_HS_archived_OSO_invalidated
(
self
):
subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
subscription
.
edit
(
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
subscription
,
'archived'
)
open_sale_order
=
self
.
portal
.
open_sale_order_module
\
.
template_open_sale_order
.
Base_createCloneDocument
(
batch_mode
=
1
)
open_sale_order
.
edit
(
reference
=
'TESTOSO-%s'
%
self
.
generateNewId
())
open_sale_order
.
newContent
(
portal_type
=
'Open Sale Order Line'
,
aggregate
=
subscription
.
getRelativeUrl
())
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
open_sale_order
,
'invalidated'
)
self
.
tic
()
self
.
portal
.
portal_alarms
\
.
slapos_request_update_hosting_subscription_open_sale_order
\
.
activeSense
()
self
.
tic
()
self
.
assertNotEqual
(
'Visited by HostingSubscription_requestUpdateOpenSaleOrder'
,
subscription
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
class
TestHostingSubscription_requestUpdateOpenSaleOrder
(
testSlapOSMixin
):
class
TestHostingSubscription_requestUpdateOpenSaleOrder
(
testSlapOSMixin
):
def
test_empty_HostingSubscription
(
self
):
def
test_empty_HostingSubscription
(
self
):
person
=
self
.
portal
.
person_module
.
template_member
\
person
=
self
.
portal
.
person_module
.
template_member
\
...
@@ -803,6 +694,7 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin):
...
@@ -803,6 +694,7 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin):
subscription
.
HostingSubscription_requestUpdateOpenSaleOrder
()
subscription
.
HostingSubscription_requestUpdateOpenSaleOrder
()
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
subscription
.
getCausalityState
(),
'solved'
)
open_sale_order_list
=
self
.
portal
.
portal_catalog
(
open_sale_order_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Open Sale Order'
,
portal_type
=
'Open Sale Order'
,
...
@@ -856,6 +748,7 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin):
...
@@ -856,6 +748,7 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin):
subscription
.
HostingSubscription_requestUpdateOpenSaleOrder
()
subscription
.
HostingSubscription_requestUpdateOpenSaleOrder
()
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
subscription
.
getCausalityState
(),
'solved'
)
open_sale_order_list
=
self
.
portal
.
portal_catalog
(
open_sale_order_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Open Sale Order'
,
portal_type
=
'Open Sale Order'
,
...
@@ -903,10 +796,12 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin):
...
@@ -903,10 +796,12 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin):
'time'
:
destroy_time
,
'time'
:
destroy_time
,
'action'
:
'request_destroy'
'action'
:
'request_destroy'
})
})
subscription
.
diverge
()
self
.
tic
()
self
.
tic
()
subscription
.
HostingSubscription_requestUpdateOpenSaleOrder
()
subscription
.
HostingSubscription_requestUpdateOpenSaleOrder
()
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
subscription
.
getCausalityState
(),
'solved'
)
open_sale_order_list
=
self
.
portal
.
portal_catalog
(
open_sale_order_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Open Sale Order'
,
portal_type
=
'Open Sale Order'
,
...
@@ -984,6 +879,7 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin):
...
@@ -984,6 +879,7 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin):
subscription
.
HostingSubscription_requestUpdateOpenSaleOrder
()
subscription
.
HostingSubscription_requestUpdateOpenSaleOrder
()
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
subscription
.
getCausalityState
(),
'solved'
)
open_sale_order_list
=
self
.
portal
.
portal_catalog
(
open_sale_order_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Open Sale Order'
,
portal_type
=
'Open Sale Order'
,
...
...
master/bt5/slapos_accounting/bt/revision
View file @
ce453497
102
103
\ No newline at end of file
\ 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