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

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

src/s/c/sc.contentrules.layout-1.0.1/src/sc/contentrules/layout/tests/test_action.py   sc.contentrules.layout(Download)
from sc.contentrules.layout.config import VOCAB
 
from sc.contentrules.layout.actions.layout import SetLayoutAction
from sc.contentrules.layout.actions.layout import SetLayoutEditForm
 
    def testInvokeEditView(self):
        element = getUtility(IRuleAction,
                             name='sc.contentrules.actions.layout')
        e = SetLayoutAction()
        editview = getMultiAdapter((e, self.folder.REQUEST),
                                   name=element.editview)
        self.failUnless(isinstance(editview, SetLayoutEditForm))
 
    def testExecute(self):
        e = SetLayoutAction()
    def testExecuteWithError(self):
        e = SetLayoutAction()
        e.layout = 'document_view'
 
        ex = getMultiAdapter((self.folder, e,