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
Jérome Perrin
slapos.core
Commits
9a8e264f
Commit
9a8e264f
authored
Nov 19, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify test.
Expanding does not depend on movement state.
parent
9e68546a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
18 deletions
+1
-18
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingDefaultInvoicingRule.py
...tTemplateItem/testSlapOSAccountingDefaultInvoicingRule.py
+0
-17
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
No files found.
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingDefaultInvoicingRule.py
View file @
9a8e264f
...
@@ -28,11 +28,6 @@ class TestDefaultInvoicingRule(testSlapOSMixin):
...
@@ -28,11 +28,6 @@ class TestDefaultInvoicingRule(testSlapOSMixin):
.
getSimulationState
.
getSimulationState
try
:
try
:
def
getSimulationStatePlanned
(
self
,
*
args
,
**
kwargs
):
def
getSimulationStatePlanned
(
self
,
*
args
,
**
kwargs
):
if
self
.
getId
()
==
'root_simulation_movement'
:
return
'planned'
def
getSimulationStateDeliveredPLanned
(
self
,
*
args
,
**
kwargs
):
if
self
.
getId
()
==
'root_simulation_movement'
:
return
'delivered'
return
'planned'
return
'planned'
SimulationMovement
.
getSimulationState
=
getSimulationStatePlanned
SimulationMovement
.
getSimulationState
=
getSimulationStatePlanned
...
@@ -79,18 +74,6 @@ class TestDefaultInvoicingRule(testSlapOSMixin):
...
@@ -79,18 +74,6 @@ class TestDefaultInvoicingRule(testSlapOSMixin):
root_simulation_movement
.
getSimulationState
())
root_simulation_movement
.
getSimulationState
())
root_simulation_movement
.
expand
(
expand_policy
=
'immediate'
)
root_simulation_movement
.
expand
(
expand_policy
=
'immediate'
)
applied_rule_list
=
root_simulation_movement
.
contentValues
(
portal_type
=
'Applied Rule'
)
# if movement is not in final state, expand is no-op
self
.
assertEqual
(
0
,
len
(
applied_rule_list
))
SimulationMovement
.
getSimulationState
=
\
getSimulationStateDeliveredPLanned
self
.
assertEqual
(
'delivered'
,
root_simulation_movement
.
getSimulationState
())
root_simulation_movement
.
expand
(
expand_policy
=
'immediate'
)
applied_rule_list
=
root_simulation_movement
.
contentValues
(
applied_rule_list
=
root_simulation_movement
.
contentValues
(
portal_type
=
'Applied Rule'
)
portal_type
=
'Applied Rule'
)
...
...
master/bt5/slapos_accounting/bt/revision
View file @
9a8e264f
60
61
\ 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