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
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
Frederic Thoma
erp5
Commits
23ed3ff9
Commit
23ed3ff9
authored
Sep 17, 2019
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testERP5Catalog: Cleanup checkRelativeUrl{,Not}InSQLPathList .
parent
ddd5eb55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
product/ERP5Catalog/tests/testERP5Catalog.py
product/ERP5Catalog/tests/testERP5Catalog.py
+10
-10
No files found.
product/ERP5Catalog/tests/testERP5Catalog.py
View file @
23ed3ff9
...
...
@@ -152,21 +152,21 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
_
,
row_list
=
sql_connection
().
query
(
sql
,
max_rows
=
0
)
return
[
x
for
x
,
in
row_list
]
def
checkRelativeUrlInSQLPathList
(
self
,
url_list
,
connection_id
=
None
):
def
checkRelativeUrlInSQLPathList
(
self
,
url_list
,
connection_id
=
None
):
path_list
=
self
.
getSQLPathList
(
connection_id
=
connection_id
)
p
ortal_id
=
self
.
getPortalId
()
p
ath_base
=
'/'
+
self
.
getPortalId
()
+
'/'
for
url
in
url_list
:
path
=
'/'
+
portal_id
+
'/'
+
url
self
.
assertTrue
(
path
in
path_list
)
LOG
(
'checkRelativeUrlInSQLPathList found path:'
,
0
,
path
)
# Note: not using assertIn as path_list is expected to be huge:
# including it in the error message would not provide any help.
self
.
assertTrue
(
path_base
+
url
in
path_list
,
url
)
def
checkRelativeUrlNotInSQLPathList
(
self
,
url_list
,
connection_id
=
None
):
def
checkRelativeUrlNotInSQLPathList
(
self
,
url_list
,
connection_id
=
None
):
path_list
=
self
.
getSQLPathList
(
connection_id
=
connection_id
)
p
ortal_id
=
self
.
getPortalId
()
p
ath_base
=
'/'
+
self
.
getPortalId
()
+
'/'
for
url
in
url_list
:
path
=
'/'
+
portal_id
+
'/'
+
url
self
.
assertTrue
(
path
not
in
path_list
)
LOG
(
'checkRelativeUrlInSQLPathList not found path:'
,
0
,
path
)
# Note: not using assertNotIn as path_list is expected to be huge:
# including it in the error message would not provide any help.
self
.
assertFalse
(
path_base
+
url
in
path_list
,
url
)
def
test_01_HasEverything
(
self
):
self
.
assertNotEquals
(
self
.
getCategoryTool
(),
None
)
...
...
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