Did I find the right examples for you? yes no

All Samples(443)  |  Call(443)  |  Derive(0)  |  Import(0)

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testCatalogTool.py   Products.CMFPlone(Download)
    def testPloneLexiconIsZCTextLexicon(self):
        # Lexicon should be a ZCTextIndex lexicon
        self.assertTrue(hasattr(aq_base(self.catalog), 'plone_lexicon'))
        self.assertEqual(self.catalog.plone_lexicon.meta_type,\
                         'ZCTextIndex Lexicon')
    def testGetObjSizeInSchema(self):
        # getObjSize column should be in catalog schema
        self.assertTrue('getObjSize' in self.catalog.schema())
 
    def testExclude_from_navInSchema(self):
        # exclude_from_nav column should be in catalog schema
        self.assertTrue('exclude_from_nav' in self.catalog.schema())
    def testIs_folderishInSchema(self):
        # is_folderish should be in catalog schema
        self.assertTrue('is_folderish' in self.catalog.schema())
 
    def testIs_folderishIsBooleanIndex(self):
        # is_folderish should be a BooleanIndex
        self.assertTrue(
             self.catalog.Indexes['is_folderish'].__class__.__name__,

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testCatalogTool.py   Products.CMFPlone(Download)
    def testPloneLexiconIsZCTextLexicon(self):
        # Lexicon should be a ZCTextIndex lexicon
        self.assertTrue(hasattr(aq_base(self.catalog), 'plone_lexicon'))
        self.assertEqual(self.catalog.plone_lexicon.meta_type,\
                         'ZCTextIndex Lexicon')
    def testGetObjSizeInSchema(self):
        # getObjSize column should be in catalog schema
        self.assertTrue('getObjSize' in self.catalog.schema())
 
    def testExclude_from_navInSchema(self):
        # exclude_from_nav column should be in catalog schema
        self.assertTrue('exclude_from_nav' in self.catalog.schema())
    def testIs_folderishInSchema(self):
        # is_folderish should be in catalog schema
        self.assertTrue('is_folderish' in self.catalog.schema())
 
    def testIs_folderishIsBooleanIndex(self):
        # is_folderish should be a BooleanIndex
        self.assertTrue(
             self.catalog.Indexes['is_folderish'].__class__.__name__,

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testPloneTool.py   Products.CMFPlone(Download)
        )
        for address in validInputs:
            self.assertTrue(val(address), '%s should validate' % address)
        for address in invalidInputs:
            self.assertFalse(val(address), '%s should fail' % address)
        )
        for address in validInputs:
            self.assertTrue(val(address), '%s should validate' % address)
        for address in invalidInputs:
            self.assertFalse(val(address), '%s should fail' % address)
    def testTypesToList(self):
        # Make sure typesToList() returns the expected types
        wl = self.utils.typesToList()
        self.assertTrue('Folder' in wl)
        self.assertTrue('Topic' in wl)
    def testSetEffectiveDate(self):
        self.assertEqual(self.doc.EffectiveDate(), 'None')
        self.utils.editMetadata(self.doc, effective_date='2001-01-01')
        self.assertTrue(self.doc.effective_date.ISO8601() \
                            .startswith('2001-01-01T00:00:00'))

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testPloneTool.py   Products.CMFPlone(Download)
        )
        for address in validInputs:
            self.assertTrue(val(address), '%s should validate' % address)
        for address in invalidInputs:
            self.assertFalse(val(address), '%s should fail' % address)
        )
        for address in validInputs:
            self.assertTrue(val(address), '%s should validate' % address)
        for address in invalidInputs:
            self.assertFalse(val(address), '%s should fail' % address)
    def testTypesToList(self):
        # Make sure typesToList() returns the expected types
        wl = self.utils.typesToList()
        self.assertTrue('Folder' in wl)
        self.assertTrue('Topic' in wl)
    def testSetEffectiveDate(self):
        self.assertEqual(self.doc.EffectiveDate(), 'None')
        self.utils.editMetadata(self.doc, effective_date='2001-01-01')
        self.assertTrue(self.doc.effective_date.ISO8601() \
                            .startswith('2001-01-01T00:00:00'))

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testDateTimeIntegration.py   Products.CMFPlone(Download)
        modified = obj.ModificationDate()   # the string representation...
        modified = DateTime(modified)       # is usually parsed again in Plone
        self.assertTrue(int(before) <= int(modified) <= int(after),
            (before, modified, after))
 
        creation = obj.CreationDate()       # the string representation...
        creation = DateTime(creation)       # is usually parsed again in Plone
        self.assertTrue(int(before) <= int(creation) <= int(after),
            (before, creation, after))
 
        effective = obj.EffectiveDate()     # the string representation...
        effective = DateTime(effective)     # is usually parsed again in Plone
        self.assertTrue(date.equalTo(effective), (date, effective))
 
    def testExpirationDate(self):
        expired = obj.ExpirationDate()      # the string representation...
        expired = DateTime(expired)         # is usually parsed again in Plone
        self.assertTrue(date.equalTo(expired), (date, expired))
 
 
            # save the time represented in the specified time zone
            obj.setEffectiveDate('2020-02-20 00:00%s' % tz)
            self.assertTrue(obj.effective_date.ISO8601().startswith(
                '2020-02-20T00:00:00'))
            start_value = obj.effective_date

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testDateTimeIntegration.py   Products.CMFPlone(Download)
        modified = obj.ModificationDate()   # the string representation...
        modified = DateTime(modified)       # is usually parsed again in Plone
        self.assertTrue(int(before) <= int(modified) <= int(after),
            (before, modified, after))
 
        creation = obj.CreationDate()       # the string representation...
        creation = DateTime(creation)       # is usually parsed again in Plone
        self.assertTrue(int(before) <= int(creation) <= int(after),
            (before, creation, after))
 
        effective = obj.EffectiveDate()     # the string representation...
        effective = DateTime(effective)     # is usually parsed again in Plone
        self.assertTrue(date.equalTo(effective), (date, effective))
 
    def testExpirationDate(self):
        expired = obj.ExpirationDate()      # the string representation...
        expired = DateTime(expired)         # is usually parsed again in Plone
        self.assertTrue(date.equalTo(expired), (date, expired))
 
 
            # save the time represented in the specified time zone
            obj.setEffectiveDate('2020-02-20 00:00%s' % tz)
            self.assertTrue(obj.effective_date.ISO8601().startswith(
                '2020-02-20T00:00:00'))
            start_value = obj.effective_date

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testRegistrationTool.py   Products.CMFPlone(Download)
                                      'email': 'foo@bar.com'})
        user = self.portal.acl_users.getUserById(member_id)
        self.assertTrue(user, 'addMember failed to create user')
 
    def testCannotRegisterWithRootAdminUsername(self):
                                      'email': 'FOO@BAR.COM'})
        user = self.portal.acl_users.getUserById(member_id)
        self.assertTrue(user, 'addMember failed to create user')
 
    def testJoinWithoutEmailRaisesValueError(self):
    def testTestPasswordValidityConfirm(self):
        # https://dev.plone.org/ticket/13325
        self.assertTrue(self.registration.testPasswordValidity(
            'validpassword', confirm=None) is None)
        self.assertFalse(self.registration.testPasswordValidity(
    def testIsMemberIdAllowedIfSubstringOfExisting(self):
        # http://dev.plone.org/plone/ticket/6396
        self.assertTrue(self.registration.isMemberIdAllowed('useri'))
 
    def testRegisteredNotify(self):
        self.assertEqual(msg['Content-Type'], 'text/plain; charset="utf-8"')
        # And a Quoted Printable encoded body
        self.assertTrue('T=C3=A4st Admin' in msg.get_payload())
 
    def testMailPassword(self):

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testEmailLogin.py   Products.CMFPlone(Download)
    def testUseEmailProperty(self):
        props = getToolByName(self.portal, 'portal_properties').site_properties
        self.assertTrue(props.hasProperty('use_email_as_login'))
        self.assertEqual(props.getProperty('use_email_as_login'), False)
 
    def testNormalMemberIdsAllowed(self):
        pattern = self.portal.portal_registration._ALLOWED_MEMBER_ID_PATTERN
        self.assertTrue(pattern.match('maurits'))
        self.assertTrue(pattern.match('Maur1ts'))
        # PLIP9214: the next test actually passes with the original
        # pattern but fails with the new one as email addresses cannot
        # end in a number:
        #self.assertTrue(pattern.match('maurits76'))
        self.assertTrue(pattern.match('MAURITS'))
        # Normal user ids are still allowed, even when using the email
        # address as login name.
        self.assertTrue(pattern.match('joe'))
        self.assertTrue(registration.isMemberIdAllowed('joe'))
        # Some normal email addresses

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testRegistrationTool.py   Products.CMFPlone(Download)
                                      'email': 'foo@bar.com'})
        user = self.portal.acl_users.getUserById(member_id)
        self.assertTrue(user, 'addMember failed to create user')
 
    def testCannotRegisterWithRootAdminUsername(self):
                                      'email': 'FOO@BAR.COM'})
        user = self.portal.acl_users.getUserById(member_id)
        self.assertTrue(user, 'addMember failed to create user')
 
    def testJoinWithoutEmailRaisesValueError(self):
    def testTestPasswordValidityConfirm(self):
        # https://dev.plone.org/ticket/13325
        self.assertTrue(self.registration.testPasswordValidity(
            'validpassword', confirm=None) is None)
        self.assertFalse(self.registration.testPasswordValidity(
    def testIsMemberIdAllowedIfSubstringOfExisting(self):
        # http://dev.plone.org/plone/ticket/6396
        self.assertTrue(self.registration.isMemberIdAllowed('useri'))
 
    def testRegisteredNotify(self):
        self.assertEqual(msg['Content-Type'], 'text/plain; charset="utf-8"')
        # And a Quoted Printable encoded body
        self.assertTrue('T=C3=A4st Admin' in msg.get_payload())
 
    def testMailPassword(self):

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testEmailLogin.py   Products.CMFPlone(Download)
    def testUseEmailProperty(self):
        props = getToolByName(self.portal, 'portal_properties').site_properties
        self.assertTrue(props.hasProperty('use_email_as_login'))
        self.assertEqual(props.getProperty('use_email_as_login'), False)
 
    def testNormalMemberIdsAllowed(self):
        pattern = self.portal.portal_registration._ALLOWED_MEMBER_ID_PATTERN
        self.assertTrue(pattern.match('maurits'))
        self.assertTrue(pattern.match('Maur1ts'))
        # PLIP9214: the next test actually passes with the original
        # pattern but fails with the new one as email addresses cannot
        # end in a number:
        #self.assertTrue(pattern.match('maurits76'))
        self.assertTrue(pattern.match('MAURITS'))
        # Normal user ids are still allowed, even when using the email
        # address as login name.
        self.assertTrue(pattern.match('joe'))
        self.assertTrue(registration.isMemberIdAllowed('joe'))
        # Some normal email addresses

  1 | 2 | 3 | 4 | 5 | 6  Next