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
Ivan Tyagov
slapos.core
Commits
834162aa
Commit
834162aa
authored
Jul 31, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Be more precise.
Check really only of registration invoice.
parent
704fe2bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
master/product/Vifib/tests/testVifibDefaultUseCase.py
master/product/Vifib/tests/testVifibDefaultUseCase.py
+13
-16
No files found.
master/product/Vifib/tests/testVifibDefaultUseCase.py
View file @
834162aa
...
...
@@ -4,20 +4,24 @@ from testVifibSlapWebService import TestVifibSlapWebServiceMixin
class
TestVifibDefaultUseCase
(
TestVifibSlapWebServiceMixin
):
def
_getRegistrationInvoice
(
self
,
person
):
transaction_list
=
self
.
portal
.
portal_catalog
(
resource_relative_url
=
self
.
portal
.
portal_preferences
\
.
getPreferredRegistrationResource
(),
portal_type
=
"Invoice Line"
,
**
{
'movement.destination_uid'
:
person
.
getUid
()}
)
self
.
assertEquals
(
1
,
len
(
transaction_list
))
return
transaction_list
[
0
].
getObject
().
getParentValue
()
def
stepCheckRegistrationAccounting
(
self
,
sequence
,
**
kw
):
"""
"""
person
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
(
sequence
[
'web_user'
])
# Check that one sale invoice has been generated for the user
transaction_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
"Sale Invoice Transaction"
,
destination_section_relative_url
=
person
.
getRelativeUrl
(),
)
self
.
assertEquals
(
1
,
len
(
transaction_list
))
sale_invoice
=
transaction_list
[
0
].
getObject
()
sale_invoice
=
self
.
_getRegistrationInvoice
(
person
)
# Check invoice creation
self
.
assertEquals
(
...
...
@@ -172,14 +176,7 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
person
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
(
sequence
[
'web_user'
])
# Check that one sale invoice has been generated for the user
transaction_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
"Sale Invoice Transaction"
,
destination_section_relative_url
=
person
.
getRelativeUrl
(),
)
self
.
assertEquals
(
1
,
len
(
transaction_list
))
sale_invoice
=
transaction_list
[
0
].
getObject
()
sale_invoice
=
self
.
_getRegistrationInvoice
(
person
)
# Check invoice creation
self
.
assertEquals
(
...
...
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