@@ -58,6 +58,27 @@ def test_max_adobe_percentage(cleanup, default_args, modify_root_config, cf_load
5858 UMAPIConfigLoader (default_args ).get_engine_options ()
5959
6060
61+ def test_update_attributes (cleanup , default_args , test_resources , modify_root_config , cf_loader ):
62+ config = cf_loader .load_root_config (test_resources ['umapi_root_config' ])
63+ assert 'adobe_users' in config and 'update_attributes' in config ['adobe_users' ]
64+ assert 'firstname' in config ['adobe_users' ]['update_attributes' ]
65+ assert 'lastname' in config ['adobe_users' ]['update_attributes' ]
66+ assert 'email' in config ['adobe_users' ]['update_attributes' ]
67+ assert 'username' not in config ['adobe_users' ]['update_attributes' ]
68+
69+ reset_rule_options ()
70+ options = UMAPIConfigLoader (default_args ).get_engine_options ()
71+ assert 'update_attributes' in options
72+ assert 'firstname' in options ['update_attributes' ]
73+ assert 'lastname' in options ['update_attributes' ]
74+ assert 'email' in options ['update_attributes' ]
75+
76+ root_config_file = modify_root_config (['adobe_users' , 'update_attributes' ], ['firstname' , 'lastname' , 'foo' ])
77+ config = cf_loader .load_root_config (root_config_file )
78+ reset_rule_options ()
79+ with pytest .raises (AssertionException ):
80+ UMAPIConfigLoader (default_args ).get_engine_options ()
81+
6182def test_additional_groups_config (cleanup , default_args , modify_root_config , cf_loader ):
6283 addl_groups = [
6384 {
0 commit comments