Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
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):
...
@@ -292,7 +292,7 @@ class TestInventory(InventoryAPITestCase):
sim_mvt
.
setDeliveryValue
(
mvt
)
sim_mvt
.
setDeliveryValue
(
mvt
)
self
.
failIf
(
sim_mvt
.
isAccountable
())
self
.
failIf
(
sim_mvt
.
isAccountable
())
# not accountable movement are not counted by getInventory
# 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
())
self
.
assertInventoryEquals
(
100
,
section_uid
=
self
.
section
.
getUid
())
def
test_OmitSimulation
(
self
):
def
test_OmitSimulation
(
self
):
...
...
product/ERP5Form/tests/testPreferences.py
View file @
24b36f8a
...
@@ -298,7 +298,7 @@ class TestPreferences(PropertySheetTestCase):
...
@@ -298,7 +298,7 @@ class TestPreferences(PropertySheetTestCase):
id
=
'user_a_1'
,
portal_type
=
'Preference'
)
id
=
'user_a_1'
,
portal_type
=
'Preference'
)
user_a_2
=
portal_preferences
.
newContent
(
user_a_2
=
portal_preferences
.
newContent
(
id
=
'user_a_2'
,
portal_type
=
'Preference'
)
id
=
'user_a_2'
,
portal_type
=
'Preference'
)
self
.
commit
();
self
.
tic
()
self
.
tic
()
# enable a pref
# enable a pref
portal_workflow
.
doActionFor
(
portal_workflow
.
doActionFor
(
...
@@ -312,7 +312,7 @@ class TestPreferences(PropertySheetTestCase):
...
@@ -312,7 +312,7 @@ class TestPreferences(PropertySheetTestCase):
user_b_1
=
portal_preferences
.
newContent
(
user_b_1
=
portal_preferences
.
newContent
(
id
=
'user_b_1'
,
portal_type
=
'Preference'
)
id
=
'user_b_1'
,
portal_type
=
'Preference'
)
user_b_1
.
setPreferredAccountingTransactionAtDate
(
DateTime
(
2002
,
02
,
02
))
user_b_1
.
setPreferredAccountingTransactionAtDate
(
DateTime
(
2002
,
02
,
02
))
self
.
commit
();
self
.
tic
()
self
.
tic
()
# enable this preference
# enable this preference
portal_workflow
.
doActionFor
(
portal_workflow
.
doActionFor
(
...
@@ -335,12 +335,12 @@ class TestPreferences(PropertySheetTestCase):
...
@@ -335,12 +335,12 @@ class TestPreferences(PropertySheetTestCase):
id
=
'manager_pref'
,
portal_type
=
'Preference'
)
id
=
'manager_pref'
,
portal_type
=
'Preference'
)
manager_pref
.
setPreferredAccountingTransactionAtDate
(
manager_pref
.
setPreferredAccountingTransactionAtDate
(
DateTime
(
2012
,
12
,
12
))
DateTime
(
2012
,
12
,
12
))
self
.
commit
();
self
.
tic
()
self
.
tic
()
# enable this preference
# enable this preference
portal_workflow
.
doActionFor
(
portal_workflow
.
doActionFor
(
manager_pref
,
'enable_action'
,
wf_id
=
'preference_workflow'
)
manager_pref
,
'enable_action'
,
wf_id
=
'preference_workflow'
)
self
.
assertEquals
(
manager_pref
.
getPreferenceState
(),
'enabled'
)
self
.
assertEquals
(
manager_pref
.
getPreferenceState
(),
'enabled'
)
self
.
commit
();
self
.
tic
()
self
.
tic
()
# check users preferences are still enabled
# check users preferences are still enabled
self
.
assertEquals
(
user_a_1
.
getPreferenceState
(),
'enabled'
)
self
.
assertEquals
(
user_a_1
.
getPreferenceState
(),
'enabled'
)
...
@@ -374,7 +374,7 @@ class TestPreferences(PropertySheetTestCase):
...
@@ -374,7 +374,7 @@ class TestPreferences(PropertySheetTestCase):
# picked first
# picked first
priority
=
Priority
.
GROUP
,
priority
=
Priority
.
GROUP
,
preferred_accounting_transaction_simulation_state_list
=
[
'user_a'
])
preferred_accounting_transaction_simulation_state_list
=
[
'user_a'
])
self
.
commit
();
self
.
tic
()
self
.
tic
()
# enable a pref
# enable a pref
portal_workflow
.
doActionFor
(
portal_workflow
.
doActionFor
(
...
@@ -385,7 +385,7 @@ class TestPreferences(PropertySheetTestCase):
...
@@ -385,7 +385,7 @@ class TestPreferences(PropertySheetTestCase):
user_b
=
portal_preferences
.
newContent
(
user_b
=
portal_preferences
.
newContent
(
id
=
'user_b'
,
portal_type
=
'Preference'
,
id
=
'user_b'
,
portal_type
=
'Preference'
,
preferred_accounting_transaction_simulation_state_list
=
[
'user_b'
])
preferred_accounting_transaction_simulation_state_list
=
[
'user_b'
])
self
.
commit
();
self
.
tic
()
self
.
tic
()
# enable this preference
# enable this preference
portal_workflow
.
doActionFor
(
portal_workflow
.
doActionFor
(
...
...
product/ERP5Type/tests/testERP5Type.py
View file @
24b36f8a
...
@@ -1680,7 +1680,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
...
@@ -1680,7 +1680,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
person
.
manage_permission
(
'View'
,
roles
=
[
'Auditor'
],
acquire
=
0
)
person
.
manage_permission
(
'View'
,
roles
=
[
'Auditor'
],
acquire
=
0
)
# The user may not view the person object.
# The user may not view the person object.
self
.
commit
();
self
.
tic
()
self
.
tic
()
self
.
assertTrue
(
'Auditor'
not
in
user
.
getRolesInContext
(
person
))
self
.
assertTrue
(
'Auditor'
not
in
user
.
getRolesInContext
(
person
))
self
.
logout
()
self
.
logout
()
newSecurityManager
(
None
,
user
)
newSecurityManager
(
None
,
user
)
...
@@ -1695,7 +1695,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
...
@@ -1695,7 +1695,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
# reflect the security change, until the affected objects are
# reflect the security change, until the affected objects are
# reindexed, and Jean-Paul believes that this should not be
# reindexed, and Jean-Paul believes that this should not be
# automatic.
# automatic.
self
.
commit
();
self
.
tic
()
self
.
tic
()
self
.
assertTrue
(
'Auditor'
in
user
.
getRolesInContext
(
person
))
self
.
assertTrue
(
'Auditor'
in
user
.
getRolesInContext
(
person
))
self
.
logout
()
self
.
logout
()
newSecurityManager
(
None
,
user
)
newSecurityManager
(
None
,
user
)
...
@@ -1706,7 +1706,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
...
@@ -1706,7 +1706,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
# Now invoke the reindexing explicitly, so the catalog should be
# Now invoke the reindexing explicitly, so the catalog should be
# synchronized.
# synchronized.
person_module
.
recursiveReindexObject
()
person_module
.
recursiveReindexObject
()
self
.
commit
();
self
.
tic
()
self
.
tic
()
self
.
assertTrue
(
'Auditor'
in
user
.
getRolesInContext
(
person
))
self
.
assertTrue
(
'Auditor'
in
user
.
getRolesInContext
(
person
))
self
.
logout
()
self
.
logout
()
newSecurityManager
(
None
,
user
)
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