Skip to content

Commit

Permalink
config hardcoded feature experiment mapping fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ozayr-zaviar committed Apr 29, 2021
1 parent 569720a commit 8fb6b73
Show file tree
Hide file tree
Showing 2 changed files with 188 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def setUp(self, config_dict='config_dict'):
},
{
'id': '42223',
'key': 'group_exp_2',
'key': 'group_2_exp_2',
'status': 'Running',
"audienceConditions": [
"or",
Expand All @@ -345,7 +345,7 @@ def setUp(self, config_dict='config_dict'):
},
{
'id': '42224',
'key': 'group_exp_2',
'key': 'group_2_exp_3',
'status': 'Running',
"audienceConditions": [
"or",
Expand Down
186 changes: 186 additions & 0 deletions tests/test_optimizely_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,90 @@ def setUp(self):
},
'id': '32223',
'key': 'group_exp_2'
},
'group_2_exp_1': {
'variations_map': {
'var_1': {
'variables_map': {

},
'id': '38901',
'key': 'var_1',
'feature_enabled': None
},
},
'id': '42222',
'key': 'group_2_exp_1'
},
'group_2_exp_2': {
'variations_map': {
'var_1': {
'variables_map': {

},
'id': '38905',
'key': 'var_1',
'feature_enabled': None
},
},
'id': '42223',
'key': 'group_2_exp_2'
},
'group_2_exp_3': {
'variations_map': {
'var_1': {
'variables_map': {

},
'id': '38906',
'key': 'var_1',
'feature_enabled': None
},
},
'id': '42224',
'key': 'group_2_exp_3'
},
'test_experiment3': {
'variations_map': {
'control': {
'variables_map': {

},
'id': '222239',
'key': 'control',
'feature_enabled': None
},
},
'id': '111134',
'key': 'test_experiment3'
},
'test_experiment4': {
'variations_map': {
'control': {
'variables_map': {

},
'id': '222240',
'key': 'control',
'feature_enabled': None
},
},
'id': '111135',
'key': 'test_experiment4'
},
'test_experiment5': {
'variations_map': {
'control': {
'variables_map': {

},
'id': '222241',
'key': 'control',
'feature_enabled': None
},
},
'id': '111136',
'key': 'test_experiment5'
}
},
'features_map': {
Expand Down Expand Up @@ -453,6 +537,108 @@ def setUp(self):
},
'id': '91114',
'key': 'test_feature_in_experiment_and_rollout'
},
'test_feature_in_exclusion_group': {
'variables_map': {

},
'experiments_map': {
'group_2_exp_1': {
'variations_map': {
'var_1': {
'variables_map': {

},
'id': '38901',
'key': 'var_1',
'feature_enabled': None
},
},
'id': '42222',
'key': 'group_2_exp_1'
},
'group_2_exp_2': {
'variations_map': {
'var_1': {
'variables_map': {

},
'id': '38905',
'key': 'var_1',
'feature_enabled': None
},
},
'id': '42223',
'key': 'group_2_exp_2'
},
'group_2_exp_3': {
'variations_map': {
'var_1': {
'variables_map': {

},
'id': '38906',
'key': 'var_1',
'feature_enabled': None
},
},
'id': '42224',
'key': 'group_2_exp_3'
}
},
'id': '91115',
'key': 'test_feature_in_exclusion_group'
},
'test_feature_in_multiple_groups': {
'variables_map': {

},
'experiments_map': {
'test_experiment3': {
'variations_map': {
'control': {
'variables_map': {

},
'id': '222239',
'key': 'control',
'feature_enabled': None
},
},
'id': '111134',
'key': 'test_experiment3'
},
'test_experiment4': {
'variations_map': {
'control': {
'variables_map': {

},
'id': '222240',
'key': 'control',
'feature_enabled': None
},
},
'id': '111135',
'key': 'test_experiment4'
},
'test_experiment5': {
'variations_map': {
'control': {
'variables_map': {

},
'id': '222241',
'key': 'control',
'feature_enabled': None
},
},
'id': '111136',
'key': 'test_experiment5'
}
},
'id': '91116',
'key': 'test_feature_in_multiple_groups'
}
},
'revision': '1',
Expand Down

0 comments on commit 8fb6b73

Please sign in to comment.