Ignore:
Timestamp:
Apr 14, 2011 4:45:57 PM (13 years ago)
Author:
kroman0
Message:

Pyflakes and pep8 fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonecomments/trunk/quintagroup/plonecomments/tests/testQPloneCommentsCommenting.py

    r3113 r3114  
    1616        self.request = self.app.REQUEST 
    1717 
    18         # VERY IMPORTANT to guarantee product skin's content visibility 
     18        # VERY IMPORTANT to guarantee product skin's content visibility 
    1919        self._refreshSkinData() 
    2020 
     
    2323        for user_id in USERS.keys(): 
    2424            self.membership.addMember(user_id, USERS[user_id]['passw'], 
    25                 USERS[user_id]['roles'], []) 
     25                USERS[user_id]['roles'], []) 
    2626 
    2727        # Add users to Discussion Manager group 
    2828        portal_groups = getToolByName(self.portal, 'portal_groups') 
    2929        dm_group = portal_groups.getGroupById('DiscussionManager') 
    30         dm_users = [dm_group.addMember(u) for u in DM_USERS_IDS] 
     30        [dm_group.addMember(u) for u in DM_USERS_IDS] 
    3131 
    3232        # Allow discussion for Document 
     
    7171        replies_after = len(self.discussion.getDiscussionFor(doc_obj).getReplies()) 
    7272        self.failUnless(replies_after-replies_before, 
    73             "Anonymous user CAN'T really add comment in terned ON *Anonymous commenting mode*.") 
     73            "Anonymous user CAN'T really add comment in terned ON *Anonymous commenting mode*.") 
    7474 
    7575    def testAddCommentToDocNotAnonymUsers(self): 
     
    119119                self.login(u) 
    120120            self.assertRaises(Unauthorized, doc_obj.discussion_reply, 
    121                 "%s's reply" % u, "text of '%s' reply" % u) 
     121                "%s's reply" % u, "text of '%s' reply" % u) 
    122122            self.login('dm_admin') 
    123123            replies_after = self.discussion.getDiscussionFor(doc_obj).getReplies() 
     
    126126                failed_users.append(u) 
    127127        self.failIf(failed_users, 
    128             "%s user(s) CAN really add comment in terned OFF " 
    129             "*Anonymous commenting mode*." % failed_users) 
     128            "%s user(s) CAN really add comment in terned OFF " 
     129            "*Anonymous commenting mode*." % failed_users) 
    130130 
    131131 
     
    151151                failed_users.append(u) 
    152152        self.failIf(failed_users, 
    153             "%s - user(s) can not really add commentin terned OFF " 
    154             "*Anonymous commenting mode*." % failed_users) 
     153            "%s - user(s) can not really add commentin terned OFF " 
     154            "*Anonymous commenting mode*." % failed_users) 
    155155 
    156156 
     
    194194                failed_users.append(u) 
    195195        self.failIf(failed_users, 
    196             "%s - member(s) of DiscussionManager group CAN'T really ADD comment" % failed_users) 
     196            "%s - member(s) of DiscussionManager group CAN'T really ADD comment" % failed_users) 
    197197 
    198198        # This is actual only in terned OFF *Anonymous commenting mode* 
     
    210210                failed_users.append(u) 
    211211        self.failIf(failed_users, 
    212             "%s user(s) CAN really add comment in terned OFF " 
    213             "*Anonymous commenting mode*." % failed_users) 
     212            "%s user(s) CAN really add comment in terned OFF " 
     213            "*Anonymous commenting mode*." % failed_users) 
    214214 
    215215    """ 
     
    263263                failed_users.append(u) 
    264264        self.failIf(failed_users, 
    265             "%s - user(s) can not really add comment to PUBLISHED reply." % failed_users) 
     265            "%s - user(s) can not really add comment to PUBLISHED reply." % failed_users) 
    266266 
    267267        # 3.Check adding reply to reply for illegal users 
     
    274274            self.discussion.getDiscussionFor(reply) 
    275275            self.assertRaises(Unauthorized, reply.discussion_reply, 
    276                 "Reply %s" % u, "text of %s reply" % u) 
     276                "Reply %s" % u, "text of %s reply" % u) 
    277277 
    278278 
     
    304304        self.discussion.getDiscussionFor(doc_obj) 
    305305        doc_obj.discussion_reply("A Reply to '%s'" % self.doc_moder_off_id, 
    306             "text of reply to '%s'" % self.doc_moder_off_id) 
     306            "text of reply to '%s'" % self.doc_moder_off_id) 
    307307 
    308308 
     
    330330                failed_users.append(u) 
    331331        self.failIf(failed_users , 
    332             "%s - member(s) CAN'T really ADD comment in terned off" 
    333             " comments Moderation mode." % failed_users) 
     332            "%s - member(s) CAN'T really ADD comment in terned off" 
     333            " comments Moderation mode." % failed_users) 
    334334 
    335335 
     
    350350            self.discussion.getDiscussionFor(reply_to_doc) 
    351351            self.assertRaises(Unauthorized, reply_to_doc.discussion_reply, 
    352             "%s's reply" % u, "text of '%s' reply" % u) 
     352            "%s's reply" % u, "text of '%s' reply" % u) 
    353353 
    354354 
Note: See TracChangeset for help on using the changeset viewer.