summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2023-02-21 14:40:47 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2023-02-21 14:40:47 +0000
commit7f046c80b9439b100965b3ee3c82b71a3b3a5aee (patch)
tree142be6727c3e90be995c8bf57bbd64470dec641a
parente249dd4727c8ca1cb6387ee983c131abc672b84e (diff)
downloadunit-7f046c80b9439b100965b3ee3c82b71a3b3a5aee.tar.gz
unit-7f046c80b9439b100965b3ee3c82b71a3b3a5aee.tar.bz2
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.
-rw-r--r--test/unit/applications/tls.py4
1 files changed, 3 insertions, 1 deletions
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):