Skip to content

Commit 1759428

Browse files
authored
Merge pull request #1116 from Orenef11/fix_default_argument_value
Removing Python mutable defaults from methods in tests/integration/__init__.py Co-authored-by: Efraimov Oren <orenef11gmail.com>
1 parent 12a8adc commit 1759428

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/integration/__init__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,15 +383,15 @@ def get_node(node_id):
383383
return CCM_CLUSTER.nodes['node%s' % node_id]
384384

385385

386-
def use_multidc(dc_list, workloads=[]):
386+
def use_multidc(dc_list, workloads=None):
387387
use_cluster(MULTIDC_CLUSTER_NAME, dc_list, start=True, workloads=workloads)
388388

389389

390-
def use_singledc(start=True, workloads=[], use_single_interface=USE_SINGLE_INTERFACE):
390+
def use_singledc(start=True, workloads=None, use_single_interface=USE_SINGLE_INTERFACE):
391391
use_cluster(CLUSTER_NAME, [3], start=start, workloads=workloads, use_single_interface=use_single_interface)
392392

393393

394-
def use_single_node(start=True, workloads=[], configuration_options={}, dse_options={}):
394+
def use_single_node(start=True, workloads=None, configuration_options=None, dse_options=None):
395395
use_cluster(SINGLE_NODE_CLUSTER_NAME, [1], start=start, workloads=workloads,
396396
configuration_options=configuration_options, dse_options=dse_options)
397397

@@ -453,10 +453,11 @@ def start_cluster_wait_for_up(cluster):
453453

454454

455455
def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None, set_keyspace=True, ccm_options=None,
456-
configuration_options={}, dse_options={}, use_single_interface=USE_SINGLE_INTERFACE):
456+
configuration_options=None, dse_options=None, use_single_interface=USE_SINGLE_INTERFACE):
457+
configuration_options = configuration_options or {}
458+
dse_options = dse_options or {}
459+
workloads = workloads or []
457460
dse_cluster = True if DSE_VERSION else False
458-
if not workloads:
459-
workloads = []
460461

461462
if ccm_options is None and DSE_VERSION:
462463
ccm_options = {"version": CCM_VERSION}

0 commit comments

Comments
 (0)