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
Hamza
erp5
Commits
1e55357b
Commit
1e55357b
authored
Oct 30, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add testing for showing not yet indexed threads using a relative url passed from REQUEST.
parent
6f583217
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
product/ERP5/tests/testERP5Discussion.py
product/ERP5/tests/testERP5Discussion.py
+29
-0
No files found.
product/ERP5/tests/testERP5Discussion.py
View file @
1e55357b
...
...
@@ -106,6 +106,35 @@ class TestERP5Discussion(ERP5TypeTestCase):
# indexed already
self
.
assertSameSet
([
post
],
thread
.
DiscussionThread_getDiscussionPostList
())
def
test_03_createDiscussionThread
(
self
):
"""
Create a disucssion thread
"""
portal
=
self
.
portal
# create web sections & set predicates
group1
=
portal
.
portal_categories
.
group
.
newContent
(
portal_type
=
'Category'
,
title
=
'Group 1'
)
web_site
=
portal
.
web_site_module
.
newContent
(
portal_type
=
'Web Site'
)
web_section1
=
web_site
.
newContent
(
portal_type
=
'Web Section'
)
web_section1
.
setMultimembershipCriterionBaseCategoryList
([
'group'
])
web_section1
.
setMembershipCriterionCategoryList
([
group1
.
getRelativeUrl
()])
self
.
tic
()
web_section1
.
WebSection_createNewDiscussionThread
(
'test1-new'
,
'test1 body'
)
discussion_thread
=
[
x
for
x
in
self
.
portal
.
discussion_thread_module
.
objectValues
()
\
if
x
.
getReference
()
==
'test1-new'
][
0
]
# not indexed yet
self
.
assertSameSet
([],
web_section1
.
WebSection_getDiscussionThreadList
())
# not indexed but its relative url is passed through REQUEST
self
.
app
.
REQUEST
.
set
(
'thread_relative_url'
,
discussion_thread
.
getRelativeUrl
())
self
.
assertSameSet
([
discussion_thread
],
web_section1
.
WebSection_getDiscussionThreadList
())
self
.
tic
()
# indexed already
self
.
assertSameSet
([
discussion_thread
],
web_section1
.
WebSection_getDiscussionThreadList
())
def
test_MultipleForum
(
self
):
"""
Test multiple forums may exists within same ERP5 Web Site.
...
...
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