From 2af309223d6050feff3f85701a93166f3d4b5fee Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 21 Aug 2023 18:06:29 -0400 Subject: add integration tests --- tests/pkgs/static_abspath_nulbyte/__init__.py | 10 ++++++++++ tests/pkgs/static_assetspec_nulbyte/__init__.py | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 tests/pkgs/static_abspath_nulbyte/__init__.py create mode 100644 tests/pkgs/static_assetspec_nulbyte/__init__.py (limited to 'tests/pkgs') diff --git a/tests/pkgs/static_abspath_nulbyte/__init__.py b/tests/pkgs/static_abspath_nulbyte/__init__.py new file mode 100644 index 000000000..a946fcdf9 --- /dev/null +++ b/tests/pkgs/static_abspath_nulbyte/__init__.py @@ -0,0 +1,10 @@ +import os + + +def includeme(config): + here = here = os.path.dirname(__file__) + static + static = os.path.normpath( + os.path.join(here, '..', '..', 'fixtures', 'statc') + ) + config.add_static_view('/', static) diff --git a/tests/pkgs/static_assetspec_nulbyte/__init__.py b/tests/pkgs/static_assetspec_nulbyte/__init__.py new file mode 100644 index 000000000..49cebab3e --- /dev/null +++ b/tests/pkgs/static_assetspec_nulbyte/__init__.py @@ -0,0 +1,2 @@ +def includeme(config): + config.add_static_view('/', 'tests:fixtures/static') -- cgit v1.2.3 From d4a821c7b134b983e72e653b17b5a25507552620 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 21 Aug 2023 18:27:04 -0400 Subject: re-add integration tests (bad merge) and add integration test for nulbyte check when asset spec override exists --- tests/pkgs/static_abspath_nulbyte/__init__.py | 3 +-- tests/pkgs/static_assetspec_nulbyte/__init__.py | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/pkgs') diff --git a/tests/pkgs/static_abspath_nulbyte/__init__.py b/tests/pkgs/static_abspath_nulbyte/__init__.py index a946fcdf9..2248522e9 100644 --- a/tests/pkgs/static_abspath_nulbyte/__init__.py +++ b/tests/pkgs/static_abspath_nulbyte/__init__.py @@ -3,8 +3,7 @@ import os def includeme(config): here = here = os.path.dirname(__file__) - static static = os.path.normpath( - os.path.join(here, '..', '..', 'fixtures', 'statc') + os.path.join(here, '..', '..', 'fixtures', 'static') ) config.add_static_view('/', static) diff --git a/tests/pkgs/static_assetspec_nulbyte/__init__.py b/tests/pkgs/static_assetspec_nulbyte/__init__.py index 49cebab3e..5ac6e8cf5 100644 --- a/tests/pkgs/static_assetspec_nulbyte/__init__.py +++ b/tests/pkgs/static_assetspec_nulbyte/__init__.py @@ -1,2 +1,5 @@ def includeme(config): config.add_static_view('/', 'tests:fixtures/static') + config.add_static_view('/sub', 'tests:fixtures/static/subdir') + config.override_asset('tests:fixtures/static/subdir', + 'tests:fixtures/static') -- cgit v1.2.3 From fe4de1da370a373a788116727849bab585edaf02 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 21 Aug 2023 18:44:48 -0400 Subject: appease linter --- tests/pkgs/static_assetspec_nulbyte/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/pkgs') diff --git a/tests/pkgs/static_assetspec_nulbyte/__init__.py b/tests/pkgs/static_assetspec_nulbyte/__init__.py index 5ac6e8cf5..d44b04e93 100644 --- a/tests/pkgs/static_assetspec_nulbyte/__init__.py +++ b/tests/pkgs/static_assetspec_nulbyte/__init__.py @@ -1,5 +1,6 @@ def includeme(config): config.add_static_view('/', 'tests:fixtures/static') config.add_static_view('/sub', 'tests:fixtures/static/subdir') - config.override_asset('tests:fixtures/static/subdir', - 'tests:fixtures/static') + config.override_asset( + 'tests:fixtures/static/subdir', 'tests:fixtures/static' + ) -- cgit v1.2.3