Skip to content

Commit 22c4f15

Browse files
patched _parse_display_names
1 parent 258cddb commit 22c4f15

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

tests/test_generate_jsonmap.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ def test_generate_json_map(
8787
mock_xml = objectify.Element("action")
8888
mock_xml["file"] = "test_child_bob.bob"
8989
mock_get_action_group.return_value = mock_xml
90+
json_map_generator_with_test_files._parse_display_name = Mock(
91+
side_effect=["Display", "Detector"]
92+
)
9093
json_map_generator_with_test_files._get_component_label = Mock(
9194
side_effect=["Display", "Detector"]
9295
)
@@ -102,14 +105,18 @@ def test_generate_json_map(
102105
def test_generate_json_map_embedded_screen(
103106
json_map_generator_with_test_files, example_json_map
104107
):
108+
list_names = [
109+
"Display",
110+
"Detector",
111+
"Embedded Display",
112+
"Embedded Display",
113+
"Embedded Display",
114+
]
115+
json_map_generator_with_test_files._parse_display_name = Mock(
116+
side_effect=list_names
117+
)
105118
json_map_generator_with_test_files._get_component_label = Mock(
106-
side_effect=[
107-
"Display",
108-
"Detector",
109-
"Embedded Display",
110-
"Embedded Display",
111-
"Embedded Display",
112-
]
119+
side_effect=list_names
113120
)
114121

115122
json_map_generator_with_test_files.bob_path = Path(
@@ -136,6 +143,9 @@ def test_generate_json_map_embedded_screen(
136143
def test_generate_json_map_nav_tabs(
137144
json_map_generator_with_test_files, example_json_map_root
138145
):
146+
json_map_generator_with_test_files._parse_display_name = Mock(
147+
side_effect=["Display", "Tab1", "Tab2"]
148+
)
139149
json_map_generator_with_test_files._get_component_label = Mock(
140150
side_effect=["Display", "Tab1", "Tab2"]
141151
)

0 commit comments

Comments
 (0)