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
Georgios Dagkakis
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
Show 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):
...
@@ -152,21 +152,21 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
_
,
row_list
=
sql_connection
().
query
(
sql
,
max_rows
=
0
)
_
,
row_list
=
sql_connection
().
query
(
sql
,
max_rows
=
0
)
return
[
x
for
x
,
in
row_list
]
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
)
path_list
=
self
.
getSQLPathList
(
connection_id
=
connection_id
)
p
ortal_id
=
self
.
getPortalId
()
p
ath_base
=
'/'
+
self
.
getPortalId
()
+
'/'
for
url
in
url_list
:
for
url
in
url_list
:
path
=
'/'
+
portal_id
+
'/'
+
url
# Note: not using assertIn as path_list is expected to be huge:
self
.
assertTrue
(
path
in
path_list
)
# including it in the error message would not provide any help.
LOG
(
'checkRelativeUrlInSQLPathList found path:'
,
0
,
path
)
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
)
path_list
=
self
.
getSQLPathList
(
connection_id
=
connection_id
)
p
ortal_id
=
self
.
getPortalId
()
p
ath_base
=
'/'
+
self
.
getPortalId
()
+
'/'
for
url
in
url_list
:
for
url
in
url_list
:
path
=
'/'
+
portal_id
+
'/'
+
url
# Note: not using assertNotIn as path_list is expected to be huge:
self
.
assertTrue
(
path
not
in
path_list
)
# including it in the error message would not provide any help.
LOG
(
'checkRelativeUrlInSQLPathList not found path:'
,
0
,
path
)
self
.
assertFalse
(
path_base
+
url
in
path_list
,
url
)
def
test_01_HasEverything
(
self
):
def
test_01_HasEverything
(
self
):
self
.
assertNotEquals
(
self
.
getCategoryTool
(),
None
)
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