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
Sven Franck
erp5
Commits
3916cbc1
Commit
3916cbc1
authored
Oct 28, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
full_text: update testERP5Catalog.py.
parent
70a32a15
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
product/ERP5Catalog/tests/testERP5Catalog.py
product/ERP5Catalog/tests/testERP5Catalog.py
+18
-18
No files found.
product/ERP5Catalog/tests/testERP5Catalog.py
View file @
3916cbc1
...
...
@@ -3545,19 +3545,19 @@ VALUES
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'
,
title
=
'Nexedi Orga'
,
description
=
'c'
)
reference
=
'c'
)
organisation
.
setGroup
(
'nexedi'
)
self
.
assertEqual
(
organisation
.
getGroupValue
(),
group_nexedi_category
)
organisation2
=
module
.
newContent
(
portal_type
=
'Organisation'
,
title
=
'Storever Orga'
,
description
=
'd'
)
reference
=
'd'
)
organisation2
.
setGroup
(
'storever'
)
organisation2
.
setTitle
(
'Organisation 2'
)
self
.
assertEqual
(
organisation2
.
getGroupValue
(),
group_nexedi_category2
)
...
...
@@ -3579,19 +3579,19 @@ VALUES
category_list
=
[
x
.
getObject
()
for
x
in
base_category
.
searchFolder
(
group_related_id
=
'storever'
)]
self
.
assertEqual
(
category_list
,[
group_nexedi_category2
])
# Try to get the category with the group related organisation
description
'd'
# Try to get the category with the group related organisation
reference
'd'
category_list
=
[
x
.
getObject
()
for
x
in
base_category
.
searchFolder
(
group_related_
description
=
'd'
)]
base_category
.
searchFolder
(
group_related_
reference
=
'd'
)]
self
.
assertEqual
(
category_list
,[
group_nexedi_category2
])
# Try to get the category with the group related organisation
description
# Try to get the category with the group related organisation
reference
# 'e'
category_list
=
[
x
.
getObject
()
for
x
in
base_category
.
searchFolder
(
group_related_
description
=
'e'
)]
base_category
.
searchFolder
(
group_related_
reference
=
'e'
)]
self
.
assertEqual
(
category_list
,[])
# Try to get the category with the default group related organisation
description
# Try to get the category with the default group related organisation
reference
# 'e'
category_list
=
[
x
.
getObject
()
for
x
in
base_category
.
searchFolder
(
default_group_related_
description
=
'e'
)]
base_category
.
searchFolder
(
default_group_related_
reference
=
'e'
)]
self
.
assertEqual
(
category_list
,[])
# Try to get the category with the group related organisation relative_url
organisation_relative_url
=
organisation
.
getRelativeUrl
()
...
...
@@ -3617,19 +3617,19 @@ VALUES
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'
,
title
=
'ERP5 Orga'
,
description
=
'c'
)
reference
=
'c'
)
organisation
.
setGroup
(
'nexedi/erp5'
)
self
.
assertEqual
(
organisation
.
getGroupValue
(),
sub_group_nexedi
)
organisation2
=
module
.
newContent
(
portal_type
=
'Organisation'
,
title
=
'Nexedi Orga'
,
description
=
'd'
)
reference
=
'd'
)
organisation2
.
setGroup
(
'nexedi'
)
# Flush message queue
self
.
tic
()
...
...
@@ -3648,15 +3648,15 @@ VALUES
base_category
.
portal_catalog
(
strict_group_related_title
=
'ERP5 Orga'
)]
self
.
assertEqual
(
category_list
,[
sub_group_nexedi
])
# Try to get the category with the group related organisation
description
d
# Try to get the category with the group related organisation
reference
d
category_list
=
[
x
.
getObject
()
for
x
in
base_category
.
portal_catalog
(
strict_group_related_
description
=
'd'
)]
strict_group_related_
reference
=
'd'
)]
self
.
assertEqual
(
category_list
,[
group_nexedi_category
])
# Try to get the category with the group related organisation
description
c
# Try to get the category with the group related organisation
reference
c
category_list
=
[
x
.
getObject
()
for
x
in
base_category
.
portal_catalog
(
strict_group_related_
description
=
'c'
)]
strict_group_related_
reference
=
'c'
)]
self
.
assertEqual
(
category_list
,[
sub_group_nexedi
])
def
test_EscapingLoginInSescurityQuery
(
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