Christoph Zwerschke
2016-04-19 a3077cb018d13886b21b4e83da8c233d13851fa2
Make tests pass under Windows
2 files modified
8 ■■■■■ changed files
pyramid/tests/test_config/test_views.py 2 ●●● patch | view | raw | blame | history
pyramid/tests/test_scripts/test_proutes.py 6 ●●●●● patch | view | raw | blame | history
pyramid/tests/test_config/test_views.py
@@ -3093,7 +3093,7 @@
        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()
pyramid/tests/test_scripts/test_proutes.py
@@ -1,3 +1,4 @@
import os
import unittest
from pyramid.tests.test_scripts import dummy
@@ -396,7 +397,8 @@
        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'
@@ -413,7 +415,7 @@
        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/',  '*'],
        ]