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
Laurent S
erp5
Commits
2c9b6c5c
Commit
2c9b6c5c
authored
Oct 30, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
full_text: update testERP5Catalog.py.
parent
521d51b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
product/ERP5Catalog/tests/testERP5Catalog.py
product/ERP5Catalog/tests/testERP5Catalog.py
+14
-14
No files found.
product/ERP5Catalog/tests/testERP5Catalog.py
View file @
2c9b6c5c
...
...
@@ -691,10 +691,10 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
portal_category
.
group
.
objectIds
()])
group_nexedi_category
=
portal_category
.
group
\
.
newContent
(
id
=
'nexedi'
,
title
=
'Nexedi'
,
description
=
'a'
)
reference
=
'a'
)
group_nexedi_category2
=
portal_category
.
group
\
.
newContent
(
id
=
'storever'
,
title
=
'Storever'
,
description
=
'b'
)
reference
=
'b'
)
module
=
portal
.
getDefaultModule
(
'Organisation'
)
organisation
=
module
.
newContent
(
portal_type
=
'Organisation'
,)
organisation
.
setGroup
(
'nexedi'
)
...
...
@@ -717,17 +717,17 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
organisation_list
=
[
x
.
getObject
()
for
x
in
module
.
searchFolder
(
group_id
=
'storever'
)]
self
.
assertEqual
(
organisation_list
,[
organisation2
])
# Try to get the organisation with the group
description
'a'
# Try to get the organisation with the group
reference
'a'
organisation_list
=
[
x
.
getObject
()
for
x
in
module
.
searchFolder
(
group_
description
=
'a'
)]
module
.
searchFolder
(
group_
reference
=
'a'
)]
self
.
assertEqual
(
organisation_list
,[
organisation
])
# Try to get the organisation with the group
description
'c'
# Try to get the organisation with the group
reference
'c'
organisation_list
=
[
x
.
getObject
()
for
x
in
module
.
searchFolder
(
group_
description
=
'c'
)]
module
.
searchFolder
(
group_
reference
=
'c'
)]
self
.
assertEqual
(
organisation_list
,[])
# Try to get the organisation with the default group
description
'c'
# Try to get the organisation with the default group
reference
'c'
organisation_list
=
[
x
.
getObject
()
for
x
in
module
.
searchFolder
(
default_group_
description
=
'c'
)]
module
.
searchFolder
(
default_group_
reference
=
'c'
)]
self
.
assertEqual
(
organisation_list
,[])
# Try to get the organisation with group relative_url
group_relative_url
=
group_nexedi_category
.
getRelativeUrl
()
...
...
@@ -753,10 +753,10 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
portal_category
.
group
.
objectIds
()])
group_nexedi_category
=
portal_category
.
group
\
.
newContent
(
id
=
'nexedi'
,
title
=
'Nexedi'
,
description
=
'a'
)
reference
=
'a'
)
sub_group_nexedi
=
group_nexedi_category
\
.
newContent
(
id
=
'erp5'
,
title
=
'ERP5'
,
description
=
'b'
)
reference
=
'b'
)
module
=
portal
.
getDefaultModule
(
'Organisation'
)
organisation
=
module
.
newContent
(
portal_type
=
'Organisation'
,)
organisation
.
setGroup
(
'nexedi/erp5'
)
...
...
@@ -772,13 +772,13 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
organisation_list
=
[
x
.
getObject
()
for
x
in
module
.
searchFolder
(
strict_group_title
=
'ERP5'
)]
self
.
assertEqual
(
organisation_list
,[
organisation
])
# Try to get the organisation with the group
description
a
# Try to get the organisation with the group
reference
a
organisation_list
=
[
x
.
getObject
()
for
x
in
module
.
searchFolder
(
strict_group_
description
=
'a'
)]
module
.
searchFolder
(
strict_group_
reference
=
'a'
)]
self
.
assertEqual
(
organisation_list
,[])
# Try to get the organisation with the group
description
b
# Try to get the organisation with the group
reference
b
organisation_list
=
[
x
.
getObject
()
for
x
in
module
.
searchFolder
(
strict_group_
description
=
'b'
)]
module
.
searchFolder
(
strict_group_
reference
=
'b'
)]
self
.
assertEqual
(
organisation_list
,[
organisation
])
def
test_22_SearchingWithUnicode
(
self
):
...
...
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