Did I find the right examples for you? yes no      Crawl my project      Python Jobs

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

src/i/w/iw.sitestat-1.0.0-beta-2/iw/sitestat/tests/test_testutils.py   iw.sitestat(Download)
    def testTestRequest(self):
        request = in_utils.TestRequest()
        request.set('dummy', 'stuff')
        self.failUnlessEqual(request.get('dummy'), 'stuff')
        return
 
    def testAddFile(self):
        self.loginAsPortalOwner()
        foo_file = in_utils.addFile(self.portal, 'foo', 'Foo')
        self.failUnlessEqual(foo_file.title_or_id(), 'Foo')
    def testAddCollage(self):
        if HAVE_COLLAGE:
            self.loginAsPortalOwner()
            foo_collage = in_utils.addCollage(self.portal, 'col', 'Collage')
            self.failUnlessEqual(foo_collage.title_or_id(), 'Collage')
    def testAddPloneArticle(self):
        if HAVE_PLONEARTICLE:
            self.loginAsPortalOwner()
            foo_article = in_utils.addPloneArticle(self.portal, 'art', 'Article')
            self.failUnlessEqual(foo_article.title_or_id(), 'Article')
    def testAddSimpleAlias(self):
        if HAVE_SIMPLEALIAS:
            self.loginAsPortalOwner()
            foo_alias = in_utils.addSimpleAlias(self.portal, 'alias', 'Alias')
            self.failUnlessEqual(foo_alias.title_or_id(), 'Alias not set')

src/i/w/iw.sitestat-1.0.0-beta-2/iw/sitestat/tests/test_utils.py   iw.sitestat(Download)
            ]
        for label, valid in tests:
            self.failUnlessEqual(utils.validateSitestatName(label), valid)
        return
 
        for original, expected in tests:
            got = utils.sitestatifyTitle(original, charset='utf-8')
            self.failUnlessEqual(got, expected)
        return