コード例 #1
0
ファイル: test_FSImage.py プロジェクト: bendavis78/zope
    def _makeOne(self, id, filename):

        from Products.CMFCore.FSImage import FSImage
        from Products.CMFCore.tests.test_DirectoryView import skin_path_name
        import os.path

        return FSImage(id, os.path.join(skin_path_name, filename))
コード例 #2
0
    def test_FSObjectLastModified_FSImage(self):
        from Products.CMFCore.FSImage import FSImage

        dummy = FSImage('dummy', __file__)  # not really an image, but anyway
        modtime = float(os.path.getmtime(__file__))
        mod = datetime.datetime.fromtimestamp(modtime, tzlocal())
        # different filesystems seem to handle datetime differently. some use microseconds
        # and others don't so to make jenkins happy lets omit the microseconds factor
        format = "%y%m%d%H%M%s"
        self.assertEqual(mod.strftime(format),
                         ILastModified(dummy)().strftime(format))
コード例 #3
0
ファイル: test_FSImage.py プロジェクト: bendavis78/zope
    def _makeOne(self, id, filename):

        from Products.CMFCore.FSImage import FSImage

        return FSImage(id, path_join(self.skin_path_name, filename))