Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
CMFDefault.tests.test_DiscussionReply.DiscussionReplyTest Class Reference
Inheritance diagram for CMFDefault.tests.test_DiscussionReply.DiscussionReplyTest:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def site_login
def testDiscussionReply

Public Attributes

 portal
 uf
 discussion
 workflow

Static Public Attributes

 layer = FunctionalLayer

Detailed Description

Definition at line 27 of file test_DiscussionReply.py.


Member Function Documentation

Reimplemented in CMFDefault.tests.test_DiscussionReply.DiscussionReplyTestMember.

Definition at line 31 of file test_DiscussionReply.py.

00031 
00032     def afterSetUp(self):
00033         setSite(self.app.site)
00034         self.portal = self.app.site
00035         # Become a Manager
00036         self.uf = self.portal.acl_users
00037         self.uf.userFolderAddUser('manager', '', ['Manager'], [])
00038         self.site_login('manager')
00039         # Make a document
00040         self.discussion = self.portal.portal_discussion
00041         self.portal.invokeFactory('Document', id='doc')
00042         self.discussion.overrideDiscussionFor(self.portal.doc, 1)
00043         # Publish it
00044         self.workflow = self.portal.portal_workflow
00045         self.workflow.doActionFor(self.portal.doc, 'publish')

Definition at line 46 of file test_DiscussionReply.py.

00046 
00047     def site_login(self, name):
00048         user = self.uf.getUserById(name)
00049         user = user.__of__(self.uf)
00050         newSecurityManager(None, user)

Here is the caller graph for this function:

Definition at line 51 of file test_DiscussionReply.py.

00051 
00052     def testDiscussionReply(self):
00053         self.discussion.getDiscussionFor(self.portal.doc)
00054         self.portal.doc.talkback.createReply('Title', 'Text')
00055         reply = self.portal.doc.talkback.objectValues()[0]
00056         self.assertEqual(reply.Title(), 'Title')
00057         self.assertEqual(reply.EditableBody(), 'Text')
00058 


Member Data Documentation

Definition at line 39 of file test_DiscussionReply.py.

Definition at line 29 of file test_DiscussionReply.py.

Definition at line 33 of file test_DiscussionReply.py.

Definition at line 35 of file test_DiscussionReply.py.

Definition at line 43 of file test_DiscussionReply.py.


The documentation for this class was generated from the following file: