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.
This commit is contained in:
Andrei Zeliankou
2023-02-21 14:40:47 +00:00
parent e249dd4727
commit 7f046c80b9

View File

@@ -52,7 +52,9 @@ class TestApplicationTLS(TestApplicationProto):
def post_ssl(self, **kwargs): def post_ssl(self, **kwargs):
return self.post(wrapper=self.context.wrap_socket, **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' conf_path = option.temp_dir + '/openssl.conf'
if not rewrite and os.path.exists(conf_path): if not rewrite and os.path.exists(conf_path):