mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-01 14:55:10 +00:00
Replace mutable default arguments in tests
This commit is contained in:
@@ -755,7 +755,7 @@ POLICYGROUPS_DIR="{}/templates"
|
|||||||
#
|
#
|
||||||
# Test genpolicy
|
# 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"""
|
"""Generate a policy"""
|
||||||
# Build up our args
|
# Build up our args
|
||||||
args = self.full_args
|
args = self.full_args
|
||||||
@@ -922,7 +922,7 @@ POLICYGROUPS_DIR="{}/templates"
|
|||||||
continue
|
continue
|
||||||
raise Exception("abstraction '{}' should be invalid".format(s))
|
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"""
|
"""Create a temporary base dir layout"""
|
||||||
base_name = 'apparmor.d'
|
base_name = 'apparmor.d'
|
||||||
if prefix:
|
if prefix:
|
||||||
|
Reference in New Issue
Block a user