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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
preetwinder
erp5
Commits
ad4712c3
Commit
ad4712c3
authored
Mar 31, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Update tests using better and meaningful assert
parent
9d69be8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
product/ERP5/tests/testBusinessTemplate.py
product/ERP5/tests/testBusinessTemplate.py
+5
-5
No files found.
product/ERP5/tests/testBusinessTemplate.py
View file @
ad4712c3
...
...
@@ -1587,7 +1587,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
method_id
=
"z_fake_method"
addSQLMethod
=
catalog
.
newContent
addSQLMethod
(
portal_type
=
'SQL Method'
,
id
=
method_id
,
title
=
''
,
connection_id
=
'erp5_sql_connection'
,
arguments_src
=
''
,
src
=
''
)
connection_id
=
'erp5_sql_connection'
,
arguments_src
=
''
,
src
=
''
)
zsql_method
=
catalog
.
_getOb
(
method_id
,
None
)
self
.
assertTrue
(
zsql_method
is
not
None
)
sequence
.
edit
(
zsql_method_id
=
method_id
)
...
...
@@ -1612,7 +1612,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
method_id
=
"z_fake_method"
addSQLMethod
=
catalog
.
newContent
addSQLMethod
(
portal_type
=
'SQL Method'
,
id
=
method_id
,
title
=
''
,
connection_id
=
'erp5_sql_connection'
,
arguments_src
=
''
,
src
=
''
)
connection_id
=
'erp5_sql_connection'
,
arguments_src
=
''
,
src
=
''
)
zsql_method
=
catalog
.
_getOb
(
method_id
,
None
)
self
.
assertTrue
(
zsql_method
is
not
None
)
sequence
.
edit
(
zsql_method_id
=
method_id
)
...
...
@@ -1636,7 +1636,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
method_id
=
"z_another_fake_method"
addSQLMethod
=
catalog
.
newContent
addSQLMethod
(
portal_type
=
'SQL Method'
,
id
=
method_id
,
title
=
''
,
connection_id
=
'erp5_sql_connection'
,
arguments_src
=
''
,
src
=
''
)
connection_id
=
'erp5_sql_connection'
,
arguments_src
=
''
,
src
=
''
)
zsql_method
=
catalog
.
_getOb
(
method_id
,
None
)
self
.
assertTrue
(
zsql_method
is
not
None
)
sequence
.
edit
(
another_zsql_method_id
=
method_id
)
...
...
@@ -1717,7 +1717,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
# check filter
filter_dict
=
catalog
.
getFilterDict
()
filter_dict
=
filter_dict
[
method_id
]
self
.
assertEqual
(
filter_dict
[
'expression_cache_key'
],
[
'portal_type'
])
self
.
assert
Items
Equal
(
filter_dict
[
'expression_cache_key'
],
[
'portal_type'
])
self
.
assertEqual
(
filter_dict
[
'type'
],
[])
self
.
assertEqual
(
filter_dict
[
'filtered'
],
1
)
self
.
assertEqual
(
filter_dict
[
'expression'
],
'python: context.isPredicate()'
)
...
...
@@ -1734,7 +1734,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
# check filter
filter_dict
=
catalog
.
getFilterDict
()
filter_dict
=
filter_dict
[
method_id
]
self
.
assertEqual
(
filter_dict
[
'expression_cache_key'
],
[
'portal_type'
])
self
.
assert
Items
Equal
(
filter_dict
[
'expression_cache_key'
],
[
'portal_type'
])
self
.
assertEqual
(
filter_dict
[
'type'
],
[])
self
.
assertEqual
(
filter_dict
[
'filtered'
],
1
)
self
.
assertEqual
(
filter_dict
[
'expression'
],
'python: context.isDelivery()'
)
...
...
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