diff --git a/schematic/visualization/tangled_tree.py b/schematic/visualization/tangled_tree.py index 07757a14d..d5b838e85 100644 --- a/schematic/visualization/tangled_tree.py +++ b/schematic/visualization/tangled_tree.py @@ -688,7 +688,7 @@ def get_node_layers_json(self, topological_gen, source_nodes, child_parents, par return layers_json - def save_outputs(self, save_file, layers_json, cn='', all_layers=[]): + def save_outputs(self, save_file, layers_json, cn='', all_layers=None): ''' Inputs: save_file (bool): Indicates whether to save a file locally or not.: @@ -702,6 +702,8 @@ def save_outputs(self, save_file, layers_json, cn='', all_layers=[]): If save_file == False: Each string represents contains the layers for a single tangled tree. If save_file ==True: is an empty list. ''' + if all_layers is None: + all_layers = [] if save_file == True: if cn: output_file_name = f"{self.schema_abbr}_{self.figure_type}_{cn}_tangled_tree.json" diff --git a/tests/test_api.py b/tests/test_api.py index 9d69c63b2..6cbb72448 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -881,6 +881,7 @@ def test_visualize_attributes(self, client, data_model_jsonld): @pytest.mark.parametrize("figure_type", ["component", "dependency"]) def test_visualize_tangled_tree_layers(self, client, figure_type, data_model_jsonld): + # TODO: Determine a 2nd data model to use for this test, test both models sequentially, add checks for content of response params = { "schema_url": data_model_jsonld, "figure_type": figure_type