Make tests pass under Windows
| | |
| | | inst = self._makeOne() |
| | | cb = DummyCacheBuster('foo') |
| | | inst.add_cache_buster(config, here, cb) |
| | | self.assertEqual(inst.cache_busters, [(here + '/', cb, False)]) |
| | | self.assertEqual(inst.cache_busters, [(here + os.sep, cb, False)]) |
| | | |
| | | def test_add_cachebuster_overwrite(self): |
| | | config = DummyConfig() |
| | |
| | | import os |
| | | import unittest |
| | | from pyramid.tests.test_scripts import dummy |
| | | |
| | |
| | | from pyramid.renderers import null_renderer as nr |
| | | config = self._makeConfig(autocommit=True) |
| | | config.add_static_view('static', 'static', cache_max_age=3600) |
| | | config.add_static_view(name='static2', path='/var/www/static') |
| | | path2 = os.path.normpath('/var/www/static') |
| | | config.add_static_view(name='static2', path=path2) |
| | | config.add_static_view( |
| | | name='pyramid_scaffold', |
| | | path='pyramid:scaffolds/starter/+package+/static' |
| | |
| | | expected = [ |
| | | ['__static/', '/static/*subpath', |
| | | 'pyramid.tests.test_scripts:static/', '*'], |
| | | ['__static2/', '/static2/*subpath', '/var/www/static/', '*'], |
| | | ['__static2/', '/static2/*subpath', path2 + os.sep, '*'], |
| | | ['__pyramid_scaffold/', '/pyramid_scaffold/*subpath', |
| | | 'pyramid:scaffolds/starter/+package+/static/', '*'], |
| | | ] |