Skip to content

Commit 0579c7e

Browse files
committed
Check call to get_config in test_api tests
1 parent 0f7e900 commit 0579c7e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/test/test_api/test_api_test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@ def test_find_tests_app_config(build_path, target, toolchain_name, app_config):
7878
src_paths = ['.']
7979
set_targets_json_location()
8080
with patch('tools.test_api.scan_resources') as mock_scan_resources,\
81-
patch('tools.test_api.build_project') as mock_build_project:
81+
patch('tools.test_api.build_project') as mock_build_project,\
82+
patch('tools.test_api.get_config') as mock_get_config:
8283
mock_build_project.return_value = "build_project"
8384
mock_scan_resources().inc_dirs.return_value = []
85+
mock_get_config.return_value = ({}, "", "")
8486

8587
build_tests(tests, src_paths, build_path, target, toolchain_name,
8688
app_config=app_config)
@@ -91,3 +93,5 @@ def test_find_tests_app_config(build_path, target, toolchain_name, app_config):
9193
"build_tests was not called with app_config"
9294
assert args[1]['app_config'] == app_config,\
9395
"build_tests was called with an incorrect app_config"
96+
mock_get_config.called_with(src_paths, target,
97+
toolchain_name, app_conifg=app_config)

0 commit comments

Comments
 (0)