Skip to content

Commit

Permalink
Unit test fix
Browse files Browse the repository at this point in the history
Signed-off-by: <>
  • Loading branch information
jitu5 committed Apr 25, 2024
1 parent 218cfc8 commit 1d8486c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package/tests/test_api/test_rest/test_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def assert_example_data(response_data):
{
"id": "uk",
"name": "uk",
"tags": ["split","train"],
"tags": ["split", "train"],
"pipelines": ["__default__"],
"type": "modularPipeline",
"modular_pipelines": None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from kedro_viz.constants import ROOT_MODULAR_PIPELINE_ID
from kedro_viz.data_access.repositories import ModularPipelinesRepository
from kedro_viz.models.flowchart import GraphNode
from kedro_viz.models.flowchart import GraphNode, GraphNodeType, ModularPipelineChild


class TestModularPipelinesRepository:
Expand Down Expand Up @@ -42,15 +42,22 @@ def test_tags_inheritance(self, identity):
identity,
inputs="x",
outputs=None,
namespace="data_science",
namespace="parent",
tags={"tag1", "tag2"},
)
)

modular_pipelines = ModularPipelinesRepository()
modular_pipelines.add_child(
"parent",
ModularPipelineChild(
id="parent.child", type=GraphNodeType.MODULAR_PIPELINE
),
)

modular_pipelines.extract_from_node(task_node)
modular_pipeline = modular_pipelines.get_or_create_modular_pipeline(
"data_science"
"parent"
)

assert "tag1" in modular_pipeline.tags
Expand Down

0 comments on commit 1d8486c

Please sign in to comment.