Change _get_controller_config to _get_merged_config, so it applies to all multi-context configs
Bug: None
Test: local acts tests and unit tests
Change-Id: I8073b2335d0ef24f8582b5deac92e0591c23f81a
diff --git a/acts/framework/tests/test_utils/instrumentation/instrumentation_base_test_test.py b/acts/framework/tests/test_utils/instrumentation/instrumentation_base_test_test.py
index 04ac8e8..0a3ddde 100755
--- a/acts/framework/tests/test_utils/instrumentation/instrumentation_base_test_test.py
+++ b/acts/framework/tests/test_utils/instrumentation/instrumentation_base_test_test.py
@@ -29,11 +29,13 @@
'lvl2': {'file1': 'FILE'}
},
'MockController': {
- 'param1': 1
+ 'param1': 1,
+ 'param2': 4
},
'MockInstrumentationBaseTest': {
'MockController': {
- 'param2': 2
+ 'param2': 2,
+ 'param3': 5
},
'test_case': {
'MockController': {
@@ -83,21 +85,21 @@
controller config for the current test case.
"""
self.instrumentation_test.current_test_name = 'test_case'
- config = self.instrumentation_test._get_controller_config(
+ config = self.instrumentation_test._get_merged_config(
'MockController')
- self.assertNotIn('param1', config)
- self.assertNotIn('param2', config)
- self.assertIn('param3', config)
+ self.assertEqual(config.get('param1'), 1)
+ self.assertEqual(config.get('param2'), 2)
+ self.assertEqual(config.get('param3'), 3)
def test_get_controller_config_for_test_class(self):
"""Test that _get_controller_config returns the controller config for
the current test class (while no test case is running).
"""
- config = self.instrumentation_test._get_controller_config(
+ config = self.instrumentation_test._get_merged_config(
'MockController')
- self.assertIn('param1', config)
- self.assertIn('param2', config)
- self.assertNotIn('param3', config)
+ self.assertEqual(config.get('param1'), 1)
+ self.assertEqual(config.get('param2'), 2)
+ self.assertEqual(config.get('param3'), 5)
if __name__ == '__main__':