From 7f046c80b9439b100965b3ee3c82b71a3b3a5aee Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Tue, 21 Feb 2023 14:40:47 +0000 Subject: Tests: removed list usage as default argument. Mutable types as default arguments is bad practice since they are evaluated only once when the function is defined. --- test/unit/applications/tls.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/unit/applications/tls.py b/test/unit/applications/tls.py index 93400328..63f0c9c4 100644 --- a/test/unit/applications/tls.py +++ b/test/unit/applications/tls.py @@ -52,7 +52,9 @@ class TestApplicationTLS(TestApplicationProto): def post_ssl(self, **kwargs): return self.post(wrapper=self.context.wrap_socket, **kwargs) - def openssl_conf(self, rewrite=False, alt_names=[]): + def openssl_conf(self, rewrite=False, alt_names=None): + alt_names = alt_names or [] + conf_path = option.temp_dir + '/openssl.conf' if not rewrite and os.path.exists(conf_path): -- cgit