Skip to content

Commit

Permalink
Fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
aliabbasrizvi committed Jun 10, 2017
1 parent 90d5500 commit f260e56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion optimizely/user_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def save_variation_for_experiment(self, experiment_id, variation_id):
Args:
experiment_id: ID for experiment for which the decision is to be stored.
variation_id: ID for variation that the user saw.
variation_id: ID for variation that the user saw.
"""

self.experiment_bucket_map.update({
Expand Down
5 changes: 3 additions & 2 deletions tests/test_optimizely.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,10 @@ def side_effect(*args, **kwargs):
with mock.patch(
'optimizely.optimizely.Optimizely.is_feature_enabled',
side_effect=side_effect) as mock_is_feature_enabled:
expected_enabled_features = ['test_feature_1', 'test_feature_2']
self.assertEqual(expected_enabled_features, optimizely_instance.get_enabled_features('user_1'))
received_features = optimizely_instance.get_enabled_features('user_1')

expected_enabled_features = ['test_feature_1', 'test_feature_2']
self.assertEqual(sorted(expected_enabled_features), sorted(received_features))
mock_is_feature_enabled.assert_any_call('test_feature_1', 'user_1', None)
mock_is_feature_enabled.assert_any_call('test_feature_2', 'user_1', None)
mock_is_feature_enabled.assert_any_call('test_feature_in_group', 'user_1', None)
Expand Down

0 comments on commit f260e56

Please sign in to comment.