@@ -135,8 +135,12 @@ def test_build_project_app_config(self, mock_prepare_toolchain, mock_exists, _,
135
135
app_config = "app_config"
136
136
mock_exists .return_value = False
137
137
mock_prepare_toolchain ().link_program .return_value = 1 , 2
138
- mock_prepare_toolchain ().config = namedtuple (
139
- "Config" , "has_regions name lib_config_data" )(None , None , {})
138
+ mock_prepare_toolchain ().config = MagicMock (
139
+ has_regions = None ,
140
+ name = None ,
141
+ lib_config_data = None ,
142
+ )
143
+ mock_prepare_toolchain ().config .deliver_into .return_value = (None , None )
140
144
141
145
build_project (self .src_paths , self .build_path , self .target ,
142
146
self .toolchain_name , app_config = app_config , notify = notify )
@@ -165,8 +169,12 @@ def test_build_project_no_app_config(self, mock_prepare_toolchain, mock_exists,
165
169
mock_exists .return_value = False
166
170
# Needed for the unpacking of the returned value
167
171
mock_prepare_toolchain ().link_program .return_value = 1 , 2
168
- mock_prepare_toolchain ().config = namedtuple (
169
- "Config" , "has_regions name lib_config_data" )(None , None , {})
172
+ mock_prepare_toolchain ().config = MagicMock (
173
+ has_regions = None ,
174
+ name = None ,
175
+ lib_config_data = None ,
176
+ )
177
+ mock_prepare_toolchain ().config .deliver_into .return_value = (None , None )
170
178
171
179
build_project (self .src_paths , self .build_path , self .target ,
172
180
self .toolchain_name , notify = notify )
0 commit comments