Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
iv
erp5
Commits
24b36f8a
Commit
24b36f8a
authored
May 15, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: remove a few self.commit()
parent
6eeaf981
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
product/ERP5/tests/testInventoryAPI.py
product/ERP5/tests/testInventoryAPI.py
+1
-1
product/ERP5Form/tests/testPreferences.py
product/ERP5Form/tests/testPreferences.py
+6
-6
product/ERP5Type/tests/testERP5Type.py
product/ERP5Type/tests/testERP5Type.py
+3
-3
No files found.
product/ERP5/tests/testInventoryAPI.py
View file @
24b36f8a
...
...
@@ -292,7 +292,7 @@ class TestInventory(InventoryAPITestCase):
sim_mvt
.
setDeliveryValue
(
mvt
)
self
.
failIf
(
sim_mvt
.
isAccountable
())
# not accountable movement are not counted by getInventory
self
.
commit
();
self
.
tic
()
# (after reindexing of course)
self
.
tic
()
# (after reindexing of course)
self
.
assertInventoryEquals
(
100
,
section_uid
=
self
.
section
.
getUid
())
def
test_OmitSimulation
(
self
):
...
...
product/ERP5Form/tests/testPreferences.py
View file @
24b36f8a
...
...
@@ -298,7 +298,7 @@ class TestPreferences(PropertySheetTestCase):
id
=
'user_a_1'
,
portal_type
=
'Preference'
)
user_a_2
=
portal_preferences
.
newContent
(
id
=
'user_a_2'
,
portal_type
=
'Preference'
)
self
.
commit
();
self
.
tic
()
self
.
tic
()
# enable a pref
portal_workflow
.
doActionFor
(
...
...
@@ -312,7 +312,7 @@ class TestPreferences(PropertySheetTestCase):
user_b_1
=
portal_preferences
.
newContent
(
id
=
'user_b_1'
,
portal_type
=
'Preference'
)
user_b_1
.
setPreferredAccountingTransactionAtDate
(
DateTime
(
2002
,
02
,
02
))
self
.
commit
();
self
.
tic
()
self
.
tic
()
# enable this preference
portal_workflow
.
doActionFor
(
...
...
@@ -335,12 +335,12 @@ class TestPreferences(PropertySheetTestCase):
id
=
'manager_pref'
,
portal_type
=
'Preference'
)
manager_pref
.
setPreferredAccountingTransactionAtDate
(
DateTime
(
2012
,
12
,
12
))
self
.
commit
();
self
.
tic
()
self
.
tic
()
# enable this preference
portal_workflow
.
doActionFor
(
manager_pref
,
'enable_action'
,
wf_id
=
'preference_workflow'
)
self
.
assertEquals
(
manager_pref
.
getPreferenceState
(),
'enabled'
)
self
.
commit
();
self
.
tic
()
self
.
tic
()
# check users preferences are still enabled
self
.
assertEquals
(
user_a_1
.
getPreferenceState
(),
'enabled'
)
...
...
@@ -374,7 +374,7 @@ class TestPreferences(PropertySheetTestCase):
# picked first
priority
=
Priority
.
GROUP
,
preferred_accounting_transaction_simulation_state_list
=
[
'user_a'
])
self
.
commit
();
self
.
tic
()
self
.
tic
()
# enable a pref
portal_workflow
.
doActionFor
(
...
...
@@ -385,7 +385,7 @@ class TestPreferences(PropertySheetTestCase):
user_b
=
portal_preferences
.
newContent
(
id
=
'user_b'
,
portal_type
=
'Preference'
,
preferred_accounting_transaction_simulation_state_list
=
[
'user_b'
])
self
.
commit
();
self
.
tic
()
self
.
tic
()
# enable this preference
portal_workflow
.
doActionFor
(
...
...
product/ERP5Type/tests/testERP5Type.py
View file @
24b36f8a
...
...
@@ -1680,7 +1680,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
person
.
manage_permission
(
'View'
,
roles
=
[
'Auditor'
],
acquire
=
0
)
# The user may not view the person object.
self
.
commit
();
self
.
tic
()
self
.
tic
()
self
.
assertTrue
(
'Auditor'
not
in
user
.
getRolesInContext
(
person
))
self
.
logout
()
newSecurityManager
(
None
,
user
)
...
...
@@ -1695,7 +1695,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
# reflect the security change, until the affected objects are
# reindexed, and Jean-Paul believes that this should not be
# automatic.
self
.
commit
();
self
.
tic
()
self
.
tic
()
self
.
assertTrue
(
'Auditor'
in
user
.
getRolesInContext
(
person
))
self
.
logout
()
newSecurityManager
(
None
,
user
)
...
...
@@ -1706,7 +1706,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
# Now invoke the reindexing explicitly, so the catalog should be
# synchronized.
person_module
.
recursiveReindexObject
()
self
.
commit
();
self
.
tic
()
self
.
tic
()
self
.
assertTrue
(
'Auditor'
in
user
.
getRolesInContext
(
person
))
self
.
logout
()
newSecurityManager
(
None
,
user
)
...
...
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