From fdffe20a8a3491d3293bd02cfe05f63b985c8b12 Mon Sep 17 00:00:00 2001 From: Chris MacNaughton Date: Wed, 30 Jan 2019 11:59:44 +0100 Subject: [PATCH] remove dynamic function default --- zaza/charm_tests/security/tests.py | 2 +- zaza/utilities/file_assertions.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zaza/charm_tests/security/tests.py b/zaza/charm_tests/security/tests.py index a174c60..fd6db82 100644 --- a/zaza/charm_tests/security/tests.py +++ b/zaza/charm_tests/security/tests.py @@ -26,7 +26,7 @@ from zaza.utilities.file_assertions import ( ) -def _make_test_function(application, file_details, paths=[]): +def _make_test_function(application, file_details, paths=None): def test(self): for unit in model.get_units(application): unit = unit.entity_id diff --git a/zaza/utilities/file_assertions.py b/zaza/utilities/file_assertions.py index 470fcd2..5993f81 100644 --- a/zaza/utilities/file_assertions.py +++ b/zaza/utilities/file_assertions.py @@ -17,8 +17,10 @@ import zaza.model as model -def assert_path_glob(test_case, unit, file_details, paths=[]): +def assert_path_glob(test_case, unit, file_details, paths=None): """Verify all files in a given directory.""" + if not paths: + paths = [] result = model.run_on_unit( unit, 'bash -c "' 'shopt -s -q globstar; '