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
Lisa Casino
slapos.core
Commits
b82367a0
Commit
b82367a0
authored
Nov 12, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bootstrap slapos_accounting unit testing.
parent
cacd3d2c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
1 deletion
+56
-1
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingOpenSaleOrderManagement.py
...mplateItem/testSlapOSAccountingOpenSaleOrderManagement.py
+54
-0
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
master/bt5/slapos_accounting/bt/template_test_id_list
master/bt5/slapos_accounting/bt/template_test_id_list
+1
-0
No files found.
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingOpenSaleOrderManagement.py
0 → 100644
View file @
b82367a0
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2012 Nexedi SA and Contributors. All Rights Reserved.
#
##############################################################################
from
Products.SlapOS.tests.testSlapOSMixin
import
\
testSlapOSMixin
class
TestOpenSaleOrderManagement
(
testSlapOSMixin
):
def
test_noOSO_newPerson
(
self
):
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
'TESTP-%s'
%
self
.
generateNewId
())
person
.
validate
()
self
.
tic
()
self
.
assertEqual
(
None
,
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Open Sale Order'
,
default_destination_section_uid
=
person
.
getUid
()
))
def
test_noOSO_after_fixConsistency
(
self
):
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
'TESTP-%s'
%
self
.
generateNewId
())
person
.
validate
()
self
.
tic
()
person
.
fixConsistency
()
self
.
tic
()
self
.
assertEqual
(
None
,
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Open Sale Order'
,
default_destination_section_uid
=
person
.
getUid
()
))
def
test_OSO_after_Person_updateOpenSaleOrder
(
self
):
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
'TESTP-%s'
%
self
.
generateNewId
())
person
.
validate
()
self
.
tic
()
person
.
Person_updateOpenSaleOrder
()
self
.
tic
()
open_sale_order_list
=
self
.
portal
.
portal_catalog
(
validation_state
=
'validated'
,
portal_type
=
'Open Sale Order'
,
default_destination_section_uid
=
person
.
getUid
()
)
self
.
assertEqual
(
1
,
len
(
open_sale_order_list
))
open_sale_order
=
open_sale_order_list
[
0
]
self
.
assertEqual
(
'SlapOS Subscription Open Sale Order'
,
open_sale_order
.
getTitle
())
master/bt5/slapos_accounting/bt/revision
View file @
b82367a0
2
\ No newline at end of file
3
\ No newline at end of file
master/bt5/slapos_accounting/bt/template_test_id_list
0 → 100644
View file @
b82367a0
testSlapOSAccountingOpenSaleOrderManagement
\ 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