@@ -331,6 +331,7 @@ def test_get_variation__ignore_user_profile_when_specified(self):
331
331
332
332
def test_get_variation_for_feature__returns_variation_for_feature_in_experiment (self ):
333
333
""" Test that get_variation_for_feature returns the variation of the experiment the feature is associated with. """
334
+
334
335
opt_obj = optimizely .Optimizely (json .dumps (self .config_dict_with_features ))
335
336
project_config = opt_obj .config
336
337
decision_service = opt_obj .decision_service
@@ -349,6 +350,7 @@ def test_get_variation_for_feature__returns_variation_for_feature_in_experiment(
349
350
def test_get_variation_for_feature__returns_variation_for_feature_in_rollout (self ):
350
351
""" Test that get_variation_for_feature returns the variation of
351
352
the experiment in the rollout that the user is bucketed into. """
353
+
352
354
opt_obj = optimizely .Optimizely (json .dumps (self .config_dict_with_features ))
353
355
project_config = opt_obj .config
354
356
decision_service = opt_obj .decision_service
@@ -364,6 +366,7 @@ def test_get_variation_for_feature__returns_variation_for_feature_in_rollout(sel
364
366
def test_get_variation_for_feature__returns_variation_if_user_not_in_experiment_but_in_rollout (self ):
365
367
""" Test that get_variation_for_feature returns the variation of the experiment in the
366
368
feature's rollout even if the user is not bucketed into the feature's experiment. """
369
+
367
370
opt_obj = optimizely .Optimizely (json .dumps (self .config_dict_with_features ))
368
371
project_config = opt_obj .config
369
372
decision_service = opt_obj .decision_service
@@ -383,6 +386,7 @@ def test_get_variation_for_feature__returns_variation_if_user_not_in_experiment_
383
386
def test_get_variation_for_feature__returns_variation_for_feature_in_group (self ):
384
387
""" Test that get_variation_for_feature returns the variation of
385
388
the experiment the user is bucketed in the feature's group. """
389
+
386
390
opt_obj = optimizely .Optimizely (json .dumps (self .config_dict_with_features ))
387
391
project_config = opt_obj .config
388
392
decision_service = opt_obj .decision_service
@@ -402,6 +406,7 @@ def test_get_variation_for_feature__returns_variation_for_feature_in_group(self)
402
406
def test_get_variation_for_feature__returns_none_for_user_not_in_group (self ):
403
407
""" Test that get_variation_for_feature returns None for
404
408
user not in group and the feature is not part of a rollout. """
409
+
405
410
opt_obj = optimizely .Optimizely (json .dumps (self .config_dict_with_features ))
406
411
project_config = opt_obj .config
407
412
decision_service = opt_obj .decision_service
@@ -418,6 +423,7 @@ def test_get_variation_for_feature__returns_none_for_user_not_in_group(self):
418
423
419
424
def test_get_variation_for_feature__returns_none_for_user_not_in_experiment (self ):
420
425
""" Test that get_variation_for_feature returns None for user not in the associated experiment. """
426
+
421
427
opt_obj = optimizely .Optimizely (json .dumps (self .config_dict_with_features ))
422
428
project_config = opt_obj .config
423
429
decision_service = opt_obj .decision_service
@@ -434,6 +440,7 @@ def test_get_variation_for_feature__returns_none_for_user_not_in_experiment(self
434
440
435
441
def test_get_variation_for_feature__returns_none_for_user_not_in_rollout (self ):
436
442
""" Test that get_variation_for_feature returns None for the user not in the associated rollout. """
443
+
437
444
opt_obj = optimizely .Optimizely (json .dumps (self .config_dict_with_features ))
438
445
project_config = opt_obj .config
439
446
decision_service = opt_obj .decision_service
@@ -451,6 +458,7 @@ def test_get_variation_for_feature__returns_none_for_user_not_in_rollout(self):
451
458
def test_get_variation_for_feature__returns_none_for_user_in_group_but_experiment_not_associated_with_feature (self ):
452
459
""" Test that if a user is in the mutex group but the experiment is
453
460
not targeting a feature, then None is returned. """
461
+
454
462
opt_obj = optimizely .Optimizely (json .dumps (self .config_dict_with_features ))
455
463
project_config = opt_obj .config
456
464
decision_service = opt_obj .decision_service
0 commit comments