Skip to content

Commit 6fa8816

Browse files
committed
Fix the nostests to accomodate new extensions config.
1 parent 7f850d7 commit 6fa8816

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

tests/config_test.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@ def test_create_dashboard_options(self, mock_dict):
8888

8989
@mock.patch('user_sync.config.DictConfig.get_string')
9090
@mock.patch('user_sync.config.DictConfig.get_dict_config')
91+
@mock.patch('user_sync.config.DictConfig.get_list_config')
9192
@mock.patch('user_sync.identity_type.parse_identity_type')
92-
def test_get_rule_options(self, mock_id_type,mock_get_dict,mock_get_string):
93+
def test_get_rule_options(self, mock_id_type,mock_get_dict,mock_get_list,mock_get_string):
9394
mock_id_type.return_value = 'new_acc'
9495
mock_get_dict.return_value = tests.helper.MockGetString()
96+
mock_get_list.return_value = tests.helper.MockGetString()
9597
self.assertEquals(self.conf_load.get_rule_options(), {'username_filter_regex': None,
9698
'update_user_info': True,
9799
'manage_groups': True,
@@ -102,7 +104,10 @@ def test_get_rule_options(self, mock_id_type,mock_get_dict,mock_get_string):
102104
'default_country_code': 'test',
103105
'remove_user_key_list': None,
104106
'remove_list_output_path': None,
105-
'remove_nonexistent_users': False},
107+
'remove_nonexistent_users': False,
108+
'after_mapping_hook': None,
109+
'extended_attributes': None,
110+
},
106111
'rule options are returned')
107112

108113
def test_parse_string(self):

tests/helper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,7 @@ def get_string(self,test1,test2):
8888
return 'test'
8989

9090
def get_int(self,test1):
91-
return 1
91+
return 1
92+
93+
def iter_dict_configs(self):
94+
return iter([])

0 commit comments

Comments
 (0)