test__api.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:guillotina 作者: plone 项目源码 文件源码
def _makeMyUtility(name, sm):
    global IMyUtility
    from zope.interface import Interface
    from zope.interface import implementer
    from guillotina.component.tests.examples import ConformsToIComponentLookup

    if IMyUtility is None:
        class IMyUtility(Interface):
            pass

    @implementer(IMyUtility)
    class MyUtility(ConformsToIComponentLookup):
        def __init__(self, id, sm):
            self.id = id
            self.sitemanager = sm

    return MyUtility(name, sm)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号