@@ -442,7 +442,7 @@ def test_detection(self, detection: Detection) -> None:
442
442
self .format_pbar_string (
443
443
TestReportingType .GROUP ,
444
444
test_group .name ,
445
- FinalTestingStates .SKIP . value ,
445
+ FinalTestingStates .SKIP ,
446
446
start_time = time .time (),
447
447
set_pbar = False ,
448
448
)
@@ -483,7 +483,7 @@ def test_detection(self, detection: Detection) -> None:
483
483
self .format_pbar_string (
484
484
TestReportingType .GROUP ,
485
485
test_group .name ,
486
- TestingStates .DONE_GROUP . value ,
486
+ TestingStates .DONE_GROUP ,
487
487
start_time = setup_results .start_time ,
488
488
set_pbar = False ,
489
489
)
@@ -504,7 +504,7 @@ def setup_test_group(self, test_group: TestGroup) -> SetupTestGroupResults:
504
504
self .format_pbar_string (
505
505
TestReportingType .GROUP ,
506
506
test_group .name ,
507
- TestingStates .BEGINNING_GROUP . value ,
507
+ TestingStates .BEGINNING_GROUP ,
508
508
start_time = setup_start_time
509
509
)
510
510
# https://github.com/WoLpH/python-progressbar/issues/164
@@ -544,7 +544,7 @@ def cleanup_test_group(
544
544
self .format_pbar_string (
545
545
TestReportingType .GROUP ,
546
546
test_group .name ,
547
- TestingStates .DELETING . value ,
547
+ TestingStates .DELETING ,
548
548
start_time = test_group_start_time ,
549
549
)
550
550
@@ -632,7 +632,7 @@ def execute_unit_test(
632
632
self .format_pbar_string (
633
633
TestReportingType .UNIT ,
634
634
f"{ detection .name } :{ test .name } " ,
635
- FinalTestingStates .SKIP . value ,
635
+ FinalTestingStates .SKIP ,
636
636
start_time = test_start_time ,
637
637
set_pbar = False ,
638
638
)
@@ -664,7 +664,7 @@ def execute_unit_test(
664
664
self .format_pbar_string (
665
665
TestReportingType .UNIT ,
666
666
f"{ detection .name } :{ test .name } " ,
667
- FinalTestingStates .ERROR . value ,
667
+ FinalTestingStates .ERROR ,
668
668
start_time = test_start_time ,
669
669
set_pbar = False ,
670
670
)
@@ -724,7 +724,7 @@ def execute_unit_test(
724
724
res = "ERROR"
725
725
link = detection .search
726
726
else :
727
- res = test .result .status .value . upper () # type: ignore
727
+ res = test .result .status .upper () # type: ignore
728
728
link = test .result .get_summary_dict ()["sid_link" ]
729
729
730
730
self .format_pbar_string (
@@ -755,7 +755,7 @@ def execute_unit_test(
755
755
self .format_pbar_string (
756
756
TestReportingType .UNIT ,
757
757
f"{ detection .name } :{ test .name } " ,
758
- FinalTestingStates .PASS . value ,
758
+ FinalTestingStates .PASS ,
759
759
start_time = test_start_time ,
760
760
set_pbar = False ,
761
761
)
@@ -766,7 +766,7 @@ def execute_unit_test(
766
766
self .format_pbar_string (
767
767
TestReportingType .UNIT ,
768
768
f"{ detection .name } :{ test .name } " ,
769
- FinalTestingStates .SKIP . value ,
769
+ FinalTestingStates .SKIP ,
770
770
start_time = test_start_time ,
771
771
set_pbar = False ,
772
772
)
@@ -777,7 +777,7 @@ def execute_unit_test(
777
777
self .format_pbar_string (
778
778
TestReportingType .UNIT ,
779
779
f"{ detection .name } :{ test .name } " ,
780
- FinalTestingStates .FAIL . value ,
780
+ FinalTestingStates .FAIL ,
781
781
start_time = test_start_time ,
782
782
set_pbar = False ,
783
783
)
@@ -788,7 +788,7 @@ def execute_unit_test(
788
788
self .format_pbar_string (
789
789
TestReportingType .UNIT ,
790
790
f"{ detection .name } :{ test .name } " ,
791
- FinalTestingStates .ERROR . value ,
791
+ FinalTestingStates .ERROR ,
792
792
start_time = test_start_time ,
793
793
set_pbar = False ,
794
794
)
@@ -821,7 +821,7 @@ def execute_integration_test(
821
821
test_start_time = time .time ()
822
822
823
823
# First, check to see if the test should be skipped (Hunting or Correlation)
824
- if detection .type in [AnalyticsType .Hunting . value , AnalyticsType .Correlation . value ]:
824
+ if detection .type in [AnalyticsType .Hunting , AnalyticsType .Correlation ]:
825
825
test .skip (
826
826
f"TEST SKIPPED: detection is type { detection .type } and cannot be integration "
827
827
"tested at this time"
@@ -843,11 +843,11 @@ def execute_integration_test(
843
843
# Determine the reporting state (we should only encounter SKIP/FAIL/ERROR)
844
844
state : str
845
845
if test .result .status == TestResultStatus .SKIP :
846
- state = FinalTestingStates .SKIP . value
846
+ state = FinalTestingStates .SKIP
847
847
elif test .result .status == TestResultStatus .FAIL :
848
- state = FinalTestingStates .FAIL . value
848
+ state = FinalTestingStates .FAIL
849
849
elif test .result .status == TestResultStatus .ERROR :
850
- state = FinalTestingStates .ERROR . value
850
+ state = FinalTestingStates .ERROR
851
851
else :
852
852
raise ValueError (
853
853
f"Status for (integration) '{ detection .name } :{ test .name } ' was preemptively set"
@@ -891,7 +891,7 @@ def execute_integration_test(
891
891
self .format_pbar_string (
892
892
TestReportingType .INTEGRATION ,
893
893
f"{ detection .name } :{ test .name } " ,
894
- FinalTestingStates .FAIL . value ,
894
+ FinalTestingStates .FAIL ,
895
895
start_time = test_start_time ,
896
896
set_pbar = False ,
897
897
)
@@ -935,7 +935,7 @@ def execute_integration_test(
935
935
if test .result is None :
936
936
res = "ERROR"
937
937
else :
938
- res = test .result .status .value . upper () # type: ignore
938
+ res = test .result .status .upper () # type: ignore
939
939
940
940
# Get the link to the saved search in this specific instance
941
941
link = f"https://{ self .infrastructure .instance_address } :{ self .infrastructure .web_ui_port } "
@@ -968,7 +968,7 @@ def execute_integration_test(
968
968
self .format_pbar_string (
969
969
TestReportingType .INTEGRATION ,
970
970
f"{ detection .name } :{ test .name } " ,
971
- FinalTestingStates .PASS . value ,
971
+ FinalTestingStates .PASS ,
972
972
start_time = test_start_time ,
973
973
set_pbar = False ,
974
974
)
@@ -979,7 +979,7 @@ def execute_integration_test(
979
979
self .format_pbar_string (
980
980
TestReportingType .INTEGRATION ,
981
981
f"{ detection .name } :{ test .name } " ,
982
- FinalTestingStates .SKIP . value ,
982
+ FinalTestingStates .SKIP ,
983
983
start_time = test_start_time ,
984
984
set_pbar = False ,
985
985
)
@@ -990,7 +990,7 @@ def execute_integration_test(
990
990
self .format_pbar_string (
991
991
TestReportingType .INTEGRATION ,
992
992
f"{ detection .name } :{ test .name } " ,
993
- FinalTestingStates .FAIL . value ,
993
+ FinalTestingStates .FAIL ,
994
994
start_time = test_start_time ,
995
995
set_pbar = False ,
996
996
)
@@ -1001,7 +1001,7 @@ def execute_integration_test(
1001
1001
self .format_pbar_string (
1002
1002
TestReportingType .INTEGRATION ,
1003
1003
f"{ detection .name } :{ test .name } " ,
1004
- FinalTestingStates .ERROR . value ,
1004
+ FinalTestingStates .ERROR ,
1005
1005
start_time = test_start_time ,
1006
1006
set_pbar = False ,
1007
1007
)
@@ -1077,7 +1077,7 @@ def retry_search_until_timeout(
1077
1077
self .format_pbar_string (
1078
1078
TestReportingType .UNIT ,
1079
1079
f"{ detection .name } :{ test .name } " ,
1080
- TestingStates .PROCESSING . value ,
1080
+ TestingStates .PROCESSING ,
1081
1081
start_time = start_time
1082
1082
)
1083
1083
@@ -1086,7 +1086,7 @@ def retry_search_until_timeout(
1086
1086
self .format_pbar_string (
1087
1087
TestReportingType .UNIT ,
1088
1088
f"{ detection .name } :{ test .name } " ,
1089
- TestingStates .SEARCHING . value ,
1089
+ TestingStates .SEARCHING ,
1090
1090
start_time = start_time ,
1091
1091
)
1092
1092
@@ -1289,7 +1289,7 @@ def replay_attack_data_file(
1289
1289
self .format_pbar_string (
1290
1290
TestReportingType .GROUP ,
1291
1291
test_group .name ,
1292
- TestingStates .DOWNLOADING . value ,
1292
+ TestingStates .DOWNLOADING ,
1293
1293
start_time = test_group_start_time
1294
1294
)
1295
1295
@@ -1307,7 +1307,7 @@ def replay_attack_data_file(
1307
1307
self .format_pbar_string (
1308
1308
TestReportingType .GROUP ,
1309
1309
test_group .name ,
1310
- TestingStates .REPLAYING . value ,
1310
+ TestingStates .REPLAYING ,
1311
1311
start_time = test_group_start_time
1312
1312
)
1313
1313
0 commit comments