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

All Samples(632)  |  Call(540)  |  Derive(0)  |  Import(92)

src/f/t/ftw.publisher.sender-2.2.0/ftw/publisher/sender/tests/test_example_workflow_constraint_definition.py   ftw.publisher.sender(Download)
from Products.CMFCore.utils import getToolByName
from ftw.builder import Builder
from ftw.builder import create
from ftw.publisher.sender.testing import PUBLISHER_SENDER_FUNCTIONAL_TESTING
from ftw.publisher.sender.tests.pages import Workflow
    def test_warning_on_submit_when_parent_is_not_published(self):
        folder = create(Builder('folder')
                        .in_state(EXAMPLE_WF_INTERNAL))
        page = create(Builder('page')
                      .within(folder)
    def test_error_on_publish_when_parent_is_not_published(self):
        folder = create(Builder('folder')
                        .in_state(EXAMPLE_WF_INTERNAL))
        page = create(Builder('page')
                      .within(folder)

src/f/t/ftw.publisher.sender-2.2.0/ftw/publisher/sender/tests/test_example_workflow_config.py   ftw.publisher.sender(Download)
from Products.CMFCore.utils import getToolByName
from ftw.builder import Builder
from ftw.builder import create
from ftw.publisher.sender.testing import PUBLISHER_SENDER_INTEGRATION_TESTING
from ftw.publisher.sender.workflows import interfaces
    def test_workflow_has_constraint_definition(self):
        page = create(Builder('page'))
        constraints = getMultiAdapter((page, page.REQUEST),
                                      interfaces.IConstraintDefinition,
                                      name=self.workflow_id)

src/p/l/plonetheme.onegov-1.2.3/plonetheme/onegov/tests/test_navigation_portlet.py   plonetheme.onegov(Download)
from Products.CMFCore.utils import getToolByName
from datetime import datetime
from ftw.builder import Builder
from ftw.builder import create
from ftw.testbrowser import browser
    def test_has_parent_link(self, browser):
        create(Builder('navigation portlet'))
        folder = create(Builder('folder'))
        browser.visit(folder)
        self.assertEquals('Plone site', portlet().css('.parent').first.text)
 
    @browsing
    def test_shows_current_context_title(self, browser):
        create(Builder('navigation portlet'))
        folder = create(Builder('folder').titled('The Folder'))

src/f/t/ftw.contentpage-1.6.5/ftw/contentpage/tests/test_authorities_view.py   ftw.contentpage(Download)
from ftw.builder import Builder
from ftw.builder import create
from ftw.contentpage.browser import authorities
from ftw.contentpage.interfaces import IAuthority
from ftw.contentpage.testing import FTW_CONTENTPAGE_FUNCTIONAL_TESTING
    def test_only_first_two_levels_visible(self):
        container = create(Builder('content page'))
 
        first = create(Builder('content page')
                       .titled('First')
                       .providing(IAuthority)
                       .within(container))
 
        second = create(Builder('content page')
                        .within(first))
 
        create(Builder('content page')
               .titled('Third')
               .providing(IAuthority)

src/f/t/ftw.publisher.sender-2.2.0/ftw/publisher/sender/tests/test_workflow_context_state.py   ftw.publisher.sender(Download)
from Products.CMFCore.utils import getToolByName
from ftw.builder import Builder
from ftw.builder import create
from ftw.publisher.sender.testing import PUBLISHER_SENDER_INTEGRATION_TESTING
from ftw.publisher.sender.workflows.contextstate import PublisherContextState
    def test_component_registered(self):
        page = create(Builder('page'))
        state = queryMultiAdapter((page, self.request),
                                  IPublisherContextState)
        self.assertTrue(state)
    def test_page_has_workflow(self):
        # workflow for type "Document" (alias "page") is installed in "setUp"
        page = create(Builder('page'))
        self.assertTrue(get_state(page).has_workflow())
 
    def test_page_has_publisher_config(self):
        page = create(Builder('page'))
    def test_get_workflow(self):
        page = create(Builder('page'))
        page_workflow = get_state(page).get_workflow()
        self.assertEquals('publisher-example-workflow', page_workflow.id)
 

src/f/t/ftw.subsite-1.3.1/ftw/subsite/tests/test_languages.py   ftw.subsite(Download)
from ftw.builder import Builder
from ftw.builder import create
from ftw.subsite.interfaces import ILanguages
from ftw.subsite.tests.base import IntegrationTestCase
from zope.component import getMultiAdapter
    def test_current_language_is_translated(self):
        german = create(Builder('subsite').with_language('de'))
 
        langs = getMultiAdapter((german, self.request), ILanguages)
        self.assertEquals(
    def test_related_languages(self):
        german = create(Builder('subsite').with_language('de'))
        french = create(Builder('subsite').with_language('fr'))
        italian = create(Builder('subsite').with_language('it'))
        introduce_language_subsites(german, french, italian)

src/f/t/ftw.contentpage-1.6.5/ftw/contentpage/tests/test_subject_listing.py   ftw.contentpage(Download)
from ftw.builder import Builder
from ftw.builder import create
from ftw.contentpage.browser.subject_listing import make_sortable
from ftw.contentpage.browser.subject_listing import normalized_first_letter
from ftw.contentpage.testing import FTW_CONTENTPAGE_FUNCTIONAL_TESTING
    def test_subjects_are_ordered_alphabetically(self):
        create(Builder('content page')
               .having(subject=['Airport']))
 
        create(Builder('content page')
    def test_subjects_with_umlauts_are_ordered_correctly(self):
        create(Builder('content page')
               .having(subject=['Grippe',
                                'Gr\xc3\xa4ber']))
 
    def test_content_links_are_ordered_alphabetically(self):
        create(Builder('content page')
               .titled('Foo')
               .having(subject=['Airport']))
        create(Builder('content page')

src/f/t/ftw.subsite-1.3.1/ftw/subsite/tests/test_languageswitcher.py   ftw.subsite(Download)
from ftw.builder import Builder
from ftw.builder import create
from ftw.subsite.testing import FTW_SUBSITE_FUNCTIONAL_TESTING
from ftw.subsite.tests.pages import LanguageSwitcher
from ftw.testing import browser
    def test_shows_other_referenced_languages(self):
        german = create(Builder('subsite').with_language('de'))
        french = create(Builder('subsite').with_language('fr'))
        italian = create(Builder('subsite').with_language('it'))
        introduce_language_subsites(german, french, italian)
    def test_going_to_another_language(self):
        german = create(Builder('subsite').with_language('de'))
        french = create(Builder('subsite').with_language('fr'))
        introduce_language_subsites(german, french)
 

src/f/t/ftw.dashboard.portlets.recentlymodified-1.2.8/ftw/dashboard/portlets/recentlymodified/tests/test_recentlymodified_portlet.py   ftw.dashboard.portlets.recentlymodified(Download)
from ftw.dashboard.portlets.recentlymodified.browser import recentlymodified
from ftw.dashboard.portlets.recentlymodified.testing \
    import FTW_RECENTLYMODIFIED_INTEGRATION_TESTING
from ftw.builder import Builder
from ftw.builder import create
    def test_title_with_section(self):
        create(Builder('folder').titled('My Folder'))
        r = self.renderer('/my-folder')
        self.assertEqual(r.title, 'My Folder')
 
    def test_data(self):
        create(Builder('folder'))
    def test_more_link(self):
        create(Builder('folder'))
 
        r = self.renderer('/folder')
        url = r.more_link()
    def test_add_portlet_with_addview(self):
        create(Builder('folder'))
 
        portal = self.layer['portal']
        portal.folder.restrictedTraverse(

src/f/t/ftw.workspace-2.1.0/ftw/workspace/tests/test_subllisting.py   ftw.workspace(Download)
from ftw.builder import Builder
from ftw.builder import create
from ftw.workspace.testing import FTW_WORKSPACE_INTEGRATION_TESTING
from plone.app.testing import login
from plone.app.testing import setRoles
        login(portal, TEST_USER_NAME)
 
        self.workspace = create(Builder('workspace'))
        self.view = self.workspace.restrictedTraverse('@@overview_sublisting')
 
    def test_sublisting_folders(self):
        create(Builder('TabbedViewFolder')
            .within(self.workspace)
            .titled('Folder'))
 
        self.assertEquals(1, len(self.view.collect()), 'Expect one Folder')
 
    def test_sublisting_result(self):
        folder1 = create(Builder('TabbedViewFolder')
    def test_sublisting_result(self):
        folder1 = create(Builder('TabbedViewFolder')
            .within(self.workspace)
            .titled('A folder'))
        folder2 = create(Builder('TabbedViewFolder')

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next