コード例 #1
0
ファイル: tests.py プロジェクト: Zojax/zojax.content.model
def setUp(test):
    setup.placefulSetUp(True)
    setUpDublinCore()
    component.provideAdapter(storage.Storage)
    component.provideAdapter(AttributeAnnotations)

    hooks.setHooks()
    setup.setUpTraversal()
    setup.setUpSiteManagerLookup()
    setup.setUpTestAsModule(test, 'zojax.content.model.README')

    # generate extension
    ExtensionClass = ExtensionType(
        "content.model",
        IViewModelExtension, ViewModelExtension,
        "View Model", "View model extension.", layer=interface.Interface)

    # register adater
    component.provideAdapter(
        Wrapper(ExtensionClass),
        (interface.Interface, interface.Interface, ExtensionMarker),
        IViewModelExtension)

    # register vocabulary
    getVocabularyRegistry().register(
        'zojax.content.model-list', Models())

    component.provideAdapter(
        Renderer, (IViewModelSupport, interface.Interface),
        interface.Interface, name='index.html')
コード例 #2
0
def setUp(test):
    cleanup.setUp()
    component.provideAdapter(AttributeAnnotations)
    testing.setUpDublinCore()
コード例 #3
0
ファイル: test_property.py プロジェクト: CGTIC/Plone_SP
def setUp(test):
    cleanup.setUp()
    component.provideAdapter(AttributeAnnotations)
    testing.setUpDublinCore()