コード例 #1
0
ファイル: testcase.py プロジェクト: bendavis78/zope
 def _registerDirectory(self, object=None):
     from Products.CMFCore.DirectoryView import registerDirectory
     from Products.CMFCore.DirectoryView import addDirectoryViews
     registerDirectory(self._skinname, self.tempname)
     if object is not None:
         ob = self.ob = DummyFolder()
         addDirectoryViews(ob, self._skinname, self.tempname)
コード例 #2
0
ファイル: testcase.py プロジェクト: bendavis78/zope
 def _registerDirectory(self, object=None, ignore=None):
     self._trap_warning_output()
     from Products.CMFCore.DirectoryView import registerDirectory
     from Products.CMFCore.DirectoryView import addDirectoryViews
     if ignore is None:
         from Products.CMFCore.DirectoryView import ignore
     registerDirectory(self._skinname, self.tempname, ignore=ignore)
     if object is not None:
         ob = self.ob = DummyFolder()
         addDirectoryViews(ob, self._skinname, self.tempname)
コード例 #3
0
 def _registerDirectory(self, obj=None, ignore=None):
     from Products.CMFCore.DirectoryView import _dirreg
     from Products.CMFCore.DirectoryView import createDirectoryView
     if ignore is None:
         from Products.CMFCore.DirectoryView import ignore
     filepath = join(self.tempname, self._skinname)
     subpath = basename(self.tempname)
     if subpath != 'tests':
         # we have a temp dir in tests
         subpath = 'tests/%s' % subpath
     reg_key = 'Products.CMFCore:%s/%s' % (subpath, self._skinname)
     _dirreg.registerDirectoryByKey(filepath, reg_key, ignore=ignore)
     if obj is not None:
         ob = obj.ob = DummyFolder()
         info = _dirreg.getDirectoryInfo(reg_key)
         for entry in info.getSubdirs():
             entry_reg_key = '/'.join((reg_key, entry))
             createDirectoryView(ob, entry_reg_key, entry)