summaryrefslogtreecommitdiff
path: root/tests/test_config/test_views.py
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2025-12-27 10:44:28 +0100
committerDaniel Schadt <kingdread@gmx.de>2025-12-27 10:44:28 +0100
commita836b77a04c898600ac208185d476062646488d3 (patch)
treeef89cff9ea8d4cd99967f95d4664649a007eb99a /tests/test_config/test_views.py
parent8b025bad44dcdf4d373b8202780fb1847d83240f (diff)
parent73593a0d318121662de1ec56bfa838a390d45f96 (diff)
downloadpyramid-a836b77a04c898600ac208185d476062646488d3.tar.gz
pyramid-a836b77a04c898600ac208185d476062646488d3.tar.bz2
pyramid-a836b77a04c898600ac208185d476062646488d3.zip
Merge remote-tracking branch 'luhn/override-get-spec'
Diffstat (limited to 'tests/test_config/test_views.py')
-rw-r--r--tests/test_config/test_views.py25
1 files changed, 19 insertions, 6 deletions
diff --git a/tests/test_config/test_views.py b/tests/test_config/test_views.py
index 2018e61f2..ce7038b5d 100644
--- a/tests/test_config/test_views.py
+++ b/tests/test_config/test_views.py
@@ -4065,9 +4065,12 @@ class TestStaticURLInfo(unittest.TestCase):
config = testing.setUp()
try:
request = testing.DummyRequest()
- config.add_static_view('static', 'path')
+ config.add_static_view(
+ 'static', 'tests.test_config.pkgs.cachebust:path/'
+ )
config.override_asset(
- 'tests.test_config:path/', 'tests.test_config:other_path/'
+ 'tests.test_config.pkgs.cachebust:path/',
+ 'tests.test_config.pkgs.cachebust:override/',
)
def cb(val):
@@ -4077,11 +4080,21 @@ class TestStaticURLInfo(unittest.TestCase):
return cb_
- config.add_cache_buster('path', cb('foo'))
- result = request.static_url('path/foo.png')
+ config.add_cache_buster(
+ 'tests.test_config.pkgs.cachebust:path/', cb('foo')
+ )
+ result = request.static_url(
+ 'tests.test_config.pkgs.cachebust:path/foo.png'
+ )
self.assertEqual(result, 'http://example.com/static/foo.png?x=foo')
- config.add_cache_buster('other_path', cb('bar'), explicit=True)
- result = request.static_url('path/foo.png')
+ config.add_cache_buster(
+ 'tests.test_config.pkgs.cachebust:override/',
+ cb('bar'),
+ explicit=True,
+ )
+ result = request.static_url(
+ 'tests.test_config.pkgs.cachebust:path/foo.png'
+ )
self.assertEqual(result, 'http://example.com/static/foo.png?x=bar')
finally:
testing.tearDown()