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

All Samples(6)  |  Call(5)  |  Derive(0)  |  Import(1)

src/s/c/sc.contentrules.metadata-1.0.1/src/sc/contentrules/metadata/tests/test_action_subject.py   sc.contentrules.metadata(Download)
from Products.CMFCore.PortalContent import PortalContent
from Products.CMFCore.PortalFolder import PortalFolder
from sc.contentrules.metadata.actions.subject import SubjectAction
from sc.contentrules.metadata.actions.subject import SubjectEditForm
from sc.contentrules.metadata.testing import INTEGRATION_TESTING
    def test_invoke_edit_view(self):
        element = getUtility(IRuleAction,
                             name='sc.contentrules.actions.Subject')
        e = SubjectAction()
        editview = getMultiAdapter((e, self.folder.REQUEST),
                                   name=element.editview)
        self.failUnless(isinstance(editview, SubjectEditForm))
 
    def test_execute_with_subject(self):
        e = SubjectAction()
    def test_execute_same_as_parent(self):
        e = SubjectAction()
        e.same_as_parent = True
        e.subject = []
 
    def test_execute_object_without_subject(self):
        e = SubjectAction()
        e.same_as_parent = False
        e.subject = ['Bar', ]
        o = self.folder['cmf']