Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
preetwinder
erp5
Commits
2c9b6c5c
Commit
2c9b6c5c
authored
10 years ago
by
Kazuhiko Shiozaki
Browse files
Options
Download
Email Patches
Plain Diff
full_text: update testERP5Catalog.py.
parent
521d51b4
Changes
1
Show 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
):
...
...
This diff is collapsed.
Click to expand it.
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