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
Nicolas Wavrant
erp5
Commits
b84c1c64
Commit
b84c1c64
authored
Feb 06, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
banking tests: don't fail if movement table is already removed
parent
1682f73a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
product/ERP5Banking/tests/TestERP5BankingMixin.py
product/ERP5Banking/tests/TestERP5BankingMixin.py
+15
-10
No files found.
product/ERP5Banking/tests/TestERP5BankingMixin.py
View file @
b84c1c64
...
@@ -791,21 +791,26 @@ class TestERP5BankingMixin(ERP5TypeTestCase):
...
@@ -791,21 +791,26 @@ class TestERP5BankingMixin(ERP5TypeTestCase):
sql_connection
.
manage_test
(
"DROP TABLE IF EXISTS movement"
)
sql_connection
.
manage_test
(
"DROP TABLE IF EXISTS movement"
)
# Delete also all ZSQL Methods related to movement table
# Delete also all ZSQL Methods related to movement table
catalog
=
self
.
portal
.
portal_catalog
.
getSQLCatalog
()
catalog
=
self
.
portal
.
portal_catalog
.
getSQLCatalog
()
catalog
.
manage_delObjects
(
ids
=
[
"z0_drop
_movement"
,
for
zsql
in
[
"z0_drop_movement"
,
"z0_uncatalog
_movement"
,
"z0_uncatalog_movement"
,
"z_catalog_movement_list"
,
"z_create_movement"
,
]:
"z_catalog_movement_list"
,
if
catalog
.
_getOb
(
zsql
,
None
)
is
not
None
:
"z_create_movement"
,
catalog
.
manage_delObjects
(
ids
=
[
zsql
])
])
# Update properties of catalog
# Update properties of catalog
sql_catalog_object_list
=
list
(
catalog
.
sql_catalog_object_list
)
sql_catalog_object_list
=
list
(
catalog
.
sql_catalog_object_list
)
sql_uncatalog_object
=
list
(
catalog
.
sql_uncatalog_object
)
sql_uncatalog_object
=
list
(
catalog
.
sql_uncatalog_object
)
sql_clear_catalog
=
list
(
catalog
.
sql_clear_catalog
)
sql_clear_catalog
=
list
(
catalog
.
sql_clear_catalog
)
sql_search_tables
=
list
(
catalog
.
sql_search_tables
)
sql_search_tables
=
list
(
catalog
.
sql_search_tables
)
if
"z_catalog_movement_list"
in
sql_catalog_object_list
:
sql_catalog_object_list
.
remove
(
"z_catalog_movement_list"
)
sql_catalog_object_list
.
remove
(
"z_catalog_movement_list"
)
if
"z0_uncatalog_movement"
in
sql_uncatalog_object
:
sql_uncatalog_object
.
remove
(
"z0_uncatalog_movement"
)
sql_uncatalog_object
.
remove
(
"z0_uncatalog_movement"
)
if
"z0_drop_movement"
in
sql_clear_catalog
:
sql_clear_catalog
.
remove
(
"z0_drop_movement"
)
sql_clear_catalog
.
remove
(
"z0_drop_movement"
)
if
"z_create_movement"
in
sql_clear_catalog
:
sql_clear_catalog
.
remove
(
"z_create_movement"
)
sql_clear_catalog
.
remove
(
"z_create_movement"
)
if
"movement"
in
sql_search_tables
:
sql_search_tables
.
remove
(
"movement"
)
sql_search_tables
.
remove
(
"movement"
)
catalog
.
sql_catalog_object_list
=
tuple
(
sql_catalog_object_list
)
catalog
.
sql_catalog_object_list
=
tuple
(
sql_catalog_object_list
)
...
...
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