1313
1414import json
1515import mock
16- from six import PY2
1716
1817from optimizely .helpers import condition as condition_helper
1918
@@ -394,13 +393,6 @@ def test_exact_string__returns_null__when_no_user_provided_value(self):
394393
395394 def test_exact_int__returns_true__when_user_provided_value_is_equal_to_condition_value (self , ):
396395
397- if PY2 :
398- evaluator = condition_helper .CustomAttributeConditionEvaluator (
399- exact_int_condition_list , {'lasers_count' : long (9000 )}, self .mock_client_logger ,
400- )
401-
402- self .assertStrictTrue (evaluator .evaluate (0 ))
403-
404396 evaluator = condition_helper .CustomAttributeConditionEvaluator (
405397 exact_int_condition_list , {'lasers_count' : 9000 }, self .mock_client_logger
406398 )
@@ -415,13 +407,6 @@ def test_exact_int__returns_true__when_user_provided_value_is_equal_to_condition
415407
416408 def test_exact_float__returns_true__when_user_provided_value_is_equal_to_condition_value (self , ):
417409
418- if PY2 :
419- evaluator = condition_helper .CustomAttributeConditionEvaluator (
420- exact_float_condition_list , {'lasers_count' : long (9000 )}, self .mock_client_logger ,
421- )
422-
423- self .assertStrictTrue (evaluator .evaluate (0 ))
424-
425410 evaluator = condition_helper .CustomAttributeConditionEvaluator (
426411 exact_float_condition_list , {'lasers_count' : 9000 }, self .mock_client_logger
427412 )
@@ -599,13 +584,6 @@ def test_greater_than_int__returns_true__when_user_value_greater_than_condition_
599584
600585 self .assertStrictTrue (evaluator .evaluate (0 ))
601586
602- if PY2 :
603- evaluator = condition_helper .CustomAttributeConditionEvaluator (
604- gt_int_condition_list , {'meters_travelled' : long (49 )}, self .mock_client_logger ,
605- )
606-
607- self .assertStrictTrue (evaluator .evaluate (0 ))
608-
609587 def test_greater_than_float__returns_true__when_user_value_greater_than_condition_value (self , ):
610588
611589 evaluator = condition_helper .CustomAttributeConditionEvaluator (
@@ -620,13 +598,6 @@ def test_greater_than_float__returns_true__when_user_value_greater_than_conditio
620598
621599 self .assertStrictTrue (evaluator .evaluate (0 ))
622600
623- if PY2 :
624- evaluator = condition_helper .CustomAttributeConditionEvaluator (
625- gt_float_condition_list , {'meters_travelled' : long (49 )}, self .mock_client_logger ,
626- )
627-
628- self .assertStrictTrue (evaluator .evaluate (0 ))
629-
630601 def test_greater_than_int__returns_false__when_user_value_not_greater_than_condition_value (self , ):
631602
632603 evaluator = condition_helper .CustomAttributeConditionEvaluator (
@@ -641,13 +612,6 @@ def test_greater_than_int__returns_false__when_user_value_not_greater_than_condi
641612
642613 self .assertStrictFalse (evaluator .evaluate (0 ))
643614
644- if PY2 :
645- evaluator = condition_helper .CustomAttributeConditionEvaluator (
646- gt_int_condition_list , {'meters_travelled' : long (47 )}, self .mock_client_logger ,
647- )
648-
649- self .assertStrictFalse (evaluator .evaluate (0 ))
650-
651615 def test_greater_than_float__returns_false__when_user_value_not_greater_than_condition_value (self , ):
652616
653617 evaluator = condition_helper .CustomAttributeConditionEvaluator (
@@ -662,13 +626,6 @@ def test_greater_than_float__returns_false__when_user_value_not_greater_than_con
662626
663627 self .assertStrictFalse (evaluator .evaluate (0 ))
664628
665- if PY2 :
666- evaluator = condition_helper .CustomAttributeConditionEvaluator (
667- gt_float_condition_list , {'meters_travelled' : long (48 )}, self .mock_client_logger ,
668- )
669-
670- self .assertStrictFalse (evaluator .evaluate (0 ))
671-
672629 def test_greater_than_int__returns_null__when_user_value_is_not_a_number (self ):
673630
674631 evaluator = condition_helper .CustomAttributeConditionEvaluator (
@@ -733,13 +690,6 @@ def test_greater_than_or_equal_int__returns_true__when_user_value_greater_than_o
733690
734691 self .assertStrictTrue (evaluator .evaluate (0 ))
735692
736- if PY2 :
737- evaluator = condition_helper .CustomAttributeConditionEvaluator (
738- gt_int_condition_list , {'meters_travelled' : long (49 )}, self .mock_client_logger ,
739- )
740-
741- self .assertStrictTrue (evaluator .evaluate (0 ))
742-
743693 def test_greater_than_or_equal_float__returns_true__when_user_value_greater_than_or_equal_condition_value (self ):
744694
745695 evaluator = condition_helper .CustomAttributeConditionEvaluator (
@@ -760,13 +710,6 @@ def test_greater_than_or_equal_float__returns_true__when_user_value_greater_than
760710
761711 self .assertStrictTrue (evaluator .evaluate (0 ))
762712
763- if PY2 :
764- evaluator = condition_helper .CustomAttributeConditionEvaluator (
765- ge_float_condition_list , {'meters_travelled' : long (49 )}, self .mock_client_logger ,
766- )
767-
768- self .assertStrictTrue (evaluator .evaluate (0 ))
769-
770713 def test_greater_than_or_equal_int__returns_false__when_user_value_not_greater_than_or_equal_condition_value (
771714 self ):
772715
@@ -782,13 +725,6 @@ def test_greater_than_or_equal_int__returns_false__when_user_value_not_greater_t
782725
783726 self .assertStrictFalse (evaluator .evaluate (0 ))
784727
785- if PY2 :
786- evaluator = condition_helper .CustomAttributeConditionEvaluator (
787- ge_int_condition_list , {'meters_travelled' : long (47 )}, self .mock_client_logger ,
788- )
789-
790- self .assertStrictFalse (evaluator .evaluate (0 ))
791-
792728 def test_greater_than_or_equal_float__returns_false__when_user_value_not_greater_than_or_equal_condition_value (
793729 self ):
794730
@@ -804,13 +740,6 @@ def test_greater_than_or_equal_float__returns_false__when_user_value_not_greater
804740
805741 self .assertStrictFalse (evaluator .evaluate (0 ))
806742
807- if PY2 :
808- evaluator = condition_helper .CustomAttributeConditionEvaluator (
809- ge_float_condition_list , {'meters_travelled' : long (48 )}, self .mock_client_logger ,
810- )
811-
812- self .assertStrictFalse (evaluator .evaluate (0 ))
813-
814743 def test_greater_than_or_equal_int__returns_null__when_user_value_is_not_a_number (self ):
815744
816745 evaluator = condition_helper .CustomAttributeConditionEvaluator (
@@ -869,13 +798,6 @@ def test_less_than_int__returns_true__when_user_value_less_than_condition_value(
869798
870799 self .assertStrictTrue (evaluator .evaluate (0 ))
871800
872- if PY2 :
873- evaluator = condition_helper .CustomAttributeConditionEvaluator (
874- lt_int_condition_list , {'meters_travelled' : long (47 )}, self .mock_client_logger ,
875- )
876-
877- self .assertStrictTrue (evaluator .evaluate (0 ))
878-
879801 def test_less_than_float__returns_true__when_user_value_less_than_condition_value (self , ):
880802
881803 evaluator = condition_helper .CustomAttributeConditionEvaluator (
@@ -890,13 +812,6 @@ def test_less_than_float__returns_true__when_user_value_less_than_condition_valu
890812
891813 self .assertStrictTrue (evaluator .evaluate (0 ))
892814
893- if PY2 :
894- evaluator = condition_helper .CustomAttributeConditionEvaluator (
895- lt_float_condition_list , {'meters_travelled' : long (48 )}, self .mock_client_logger ,
896- )
897-
898- self .assertStrictTrue (evaluator .evaluate (0 ))
899-
900815 def test_less_than_int__returns_false__when_user_value_not_less_than_condition_value (self , ):
901816
902817 evaluator = condition_helper .CustomAttributeConditionEvaluator (
@@ -911,13 +826,6 @@ def test_less_than_int__returns_false__when_user_value_not_less_than_condition_v
911826
912827 self .assertStrictFalse (evaluator .evaluate (0 ))
913828
914- if PY2 :
915- evaluator = condition_helper .CustomAttributeConditionEvaluator (
916- lt_int_condition_list , {'meters_travelled' : long (49 )}, self .mock_client_logger ,
917- )
918-
919- self .assertStrictFalse (evaluator .evaluate (0 ))
920-
921829 def test_less_than_float__returns_false__when_user_value_not_less_than_condition_value (self , ):
922830
923831 evaluator = condition_helper .CustomAttributeConditionEvaluator (
@@ -932,13 +840,6 @@ def test_less_than_float__returns_false__when_user_value_not_less_than_condition
932840
933841 self .assertStrictFalse (evaluator .evaluate (0 ))
934842
935- if PY2 :
936- evaluator = condition_helper .CustomAttributeConditionEvaluator (
937- lt_float_condition_list , {'meters_travelled' : long (49 )}, self .mock_client_logger ,
938- )
939-
940- self .assertStrictFalse (evaluator .evaluate (0 ))
941-
942843 def test_less_than_int__returns_null__when_user_value_is_not_a_number (self ):
943844
944845 evaluator = condition_helper .CustomAttributeConditionEvaluator (
@@ -991,19 +892,6 @@ def test_less_than_or_equal_int__returns_true__when_user_value_less_than_or_equa
991892
992893 self .assertStrictTrue (evaluator .evaluate (0 ))
993894
994- if PY2 :
995- evaluator = condition_helper .CustomAttributeConditionEvaluator (
996- le_int_condition_list , {'meters_travelled' : long (47 )}, self .mock_client_logger ,
997- )
998-
999- self .assertStrictTrue (evaluator .evaluate (0 ))
1000-
1001- evaluator = condition_helper .CustomAttributeConditionEvaluator (
1002- le_int_condition_list , {'meters_travelled' : long (48 )}, self .mock_client_logger ,
1003- )
1004-
1005- self .assertStrictTrue (evaluator .evaluate (0 ))
1006-
1007895 def test_less_than_or_equal_float__returns_true__when_user_value_less_than_or_equal_condition_value (self ):
1008896
1009897 evaluator = condition_helper .CustomAttributeConditionEvaluator (
@@ -1024,13 +912,6 @@ def test_less_than_or_equal_float__returns_true__when_user_value_less_than_or_eq
1024912
1025913 self .assertStrictTrue (evaluator .evaluate (0 ))
1026914
1027- if PY2 :
1028- evaluator = condition_helper .CustomAttributeConditionEvaluator (
1029- le_float_condition_list , {'meters_travelled' : long (48 )}, self .mock_client_logger ,
1030- )
1031-
1032- self .assertStrictTrue (evaluator .evaluate (0 ))
1033-
1034915 def test_less_than_or_equal_int__returns_false__when_user_value_not_less_than_or_equal_condition_value (self ):
1035916
1036917 evaluator = condition_helper .CustomAttributeConditionEvaluator (
@@ -1045,13 +926,6 @@ def test_less_than_or_equal_int__returns_false__when_user_value_not_less_than_or
1045926
1046927 self .assertStrictFalse (evaluator .evaluate (0 ))
1047928
1048- if PY2 :
1049- evaluator = condition_helper .CustomAttributeConditionEvaluator (
1050- le_int_condition_list , {'meters_travelled' : long (49 )}, self .mock_client_logger ,
1051- )
1052-
1053- self .assertStrictFalse (evaluator .evaluate (0 ))
1054-
1055929 def test_less_than_or_equal_float__returns_false__when_user_value_not_less_than_or_equal_condition_value (self ):
1056930
1057931 evaluator = condition_helper .CustomAttributeConditionEvaluator (
@@ -1066,13 +940,6 @@ def test_less_than_or_equal_float__returns_false__when_user_value_not_less_than_
1066940
1067941 self .assertStrictFalse (evaluator .evaluate (0 ))
1068942
1069- if PY2 :
1070- evaluator = condition_helper .CustomAttributeConditionEvaluator (
1071- le_float_condition_list , {'meters_travelled' : long (49 )}, self .mock_client_logger ,
1072- )
1073-
1074- self .assertStrictFalse (evaluator .evaluate (0 ))
1075-
1076943 def test_less_than_or_equal_int__returns_null__when_user_value_is_not_a_number (self ):
1077944
1078945 evaluator = condition_helper .CustomAttributeConditionEvaluator (
0 commit comments