def testAddCommentAsNotAnonymousLeavesOwnershipAlone(self): conv = self.conv addMember(self, 'member2') self.login('member2') self.assertNotEqual(conv.getForum().owner_info()['id'], 'member2') reply = conv.addComment('reply1', 'body1') self.assertEqual(reply.owner_info()['id'], 'member2')
def testAddReplyAsNotAnonymousLeavesOwnershipAlone(self): conv = self.conv addMember(self, 'member2') self.login('member2') self.assertNotEqual(conv.getForum().owner_info()['id'], 'member2') reply = self.comment.addReply('reply1', 'body1') self.assertEqual(reply.owner_info()['id'], 'member2')
def testAddReplyAsNotAnonymousLeavesOwnershipAlone(self): conv = self.conv comment = conv.objectValues()[0] addMember(self, 'member2') self.login('member2') self.assertNotEqual(conv.getForum().owner_info()['id'], 'member2') reply = comment.addReply('reply1', 'body1') self.assertEqual(reply.owner_info()['id'], 'member2')
def testMemberWithFullname(self): addMember(self, 'memberwithfullname', fullname='MemberName') self.login('memberwithfullname') comment = self.conv.addComment('subject4', 'body4') commentview = comment.restrictedTraverse('@@singlecomment_view') self.assertEqual(commentview.author(), 'MemberName')
def testMemberWithNoFullname(self): addMember(self, 'membernofullname', fullname='') login(self.portal, 'membernofullname') comment = self.conv.addComment('subject3', 'body3') commentview = comment.restrictedTraverse('@@singlecomment_view') self.assertEqual(commentview.author(), 'membernofullname')