2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

Replace mutable default arguments in tests

This commit is contained in:
Mark Grassi
2023-02-19 17:12:30 -05:00
parent 844a4dc393
commit 14e01b5d73

View File

@@ -755,7 +755,7 @@ POLICYGROUPS_DIR="{}/templates"
#
# Test genpolicy
#
def _gen_policy(self, name=None, template=None, extra_args=[]):
def _gen_policy(self, name=None, template=None, extra_args=None):
"""Generate a policy"""
# Build up our args
args = self.full_args
@@ -922,7 +922,7 @@ POLICYGROUPS_DIR="{}/templates"
continue
raise Exception("abstraction '{}' should be invalid".format(s))
def _create_tmp_base_dir(self, prefix='', abstractions=[], tunables=[]):
def _create_tmp_base_dir(self, prefix='', abstractions=(), tunables=()):
"""Create a temporary base dir layout"""
base_name = 'apparmor.d'
if prefix: