diff -r addb81a42c5d -r 2a4bc6f75e9c etwist/test/unittest_server.py --- a/etwist/test/unittest_server.py Thu Mar 01 17:22:56 2012 +0100 +++ b/etwist/test/unittest_server.py Mon Feb 27 17:02:31 2012 +0100 @@ -19,8 +19,7 @@ import os, os.path as osp, glob from cubicweb.devtools.testlib import CubicWebTC -from cubicweb.etwist.server import (host_prefixed_baseurl, ConcatFiles, - ConcatFileNotFoundError) +from cubicweb.etwist.server import host_prefixed_baseurl class HostPrefixedBaseURLTC(CubicWebTC): @@ -54,36 +53,6 @@ self._check('http://localhost:8080/hg/', 'code.cubicweb.org', 'http://localhost:8080/hg/') - if __name__ == '__main__': from logilab.common.testlib import unittest_main unittest_main() - - - -class ConcatFilesTC(CubicWebTC): - - def tearDown(self): - super(ConcatFilesTC, self).tearDown() - self._cleanup_concat_cache() - self.config.debugmode = False - - def _cleanup_concat_cache(self): - uicachedir = osp.join(self.config.apphome, 'uicache') - for fname in glob.glob(osp.join(uicachedir, 'cache_concat_*')): - os.unlink(osp.join(uicachedir, fname)) - - def test_cache(self): - concat = ConcatFiles(self.config, ('cubicweb.ajax.js', 'jquery.js')) - self.assertTrue(osp.isfile(concat.path)) - - def test_404(self): - # when not in debug mode, should not crash - ConcatFiles(self.config, ('cubicweb.ajax.js', 'dummy.js')) - # in debug mode, raise error - self.config.debugmode = True - try: - self.assertRaises(ConcatFileNotFoundError, ConcatFiles, self.config, - ('cubicweb.ajax.js', 'dummy.js')) - finally: - self.config.debugmode = False