@@ -26,7 +26,7 @@ def test_parse_file_exemple(self):
2626 self .assertIsNone (finding .unique_id_from_tool ) # interesting findings are not vlunerability
2727 self .assertEqual ("Info" , finding .severity ) # it is not a vulnerability so severity should be 'Info'
2828 self .assertEqual ("Interesting finding: Headers" , finding .title )
29- self .assertEqual (datetime .datetime (2021 , 3 , 26 , 11 , 50 , 50 ), finding .date )
29+ self .assertEqual (datetime .datetime (2021 , 3 , 26 , 11 , 50 , 50 , tzinfo = datetime . UTC ), finding .date )
3030
3131 def test_parse_file_with_no_vuln_has_no_findings (self ):
3232 with open ("unittests/scans/wpscan/wordpress_no_vuln.json" , encoding = "utf-8" ) as testfile :
@@ -49,7 +49,7 @@ def test_parse_file_with_one_vuln_has_one_findings(self):
4949 self .assertEqual ("8873" , finding .unique_id_from_tool )
5050 self .assertNotEqual ("Info" , finding .severity ) # it is a vulnerability so not 'Info'
5151 self .assertEqual ("YouTube Embed <= 11.8.1 - Cross-Site Request Forgery (CSRF)" , finding .title )
52- self .assertEqual (datetime .datetime (2019 , 7 , 2 , 19 , 11 , 16 ), finding .date )
52+ self .assertEqual (datetime .datetime (2019 , 7 , 2 , 19 , 11 , 16 , tzinfo = datetime . UTC ), finding .date )
5353
5454 def test_parse_file_with_multiple_vuln_has_multiple_finding (self ):
5555 with open ("unittests/scans/wpscan/wordpress_many_vuln.json" , encoding = "utf-8" ) as testfile :
@@ -63,7 +63,7 @@ def test_parse_file_with_multiple_vuln_has_multiple_finding(self):
6363 self .assertEqual ("8873" , finding .unique_id_from_tool )
6464 self .assertNotEqual ("Info" , finding .severity ) # it is a vulnerability so not 'Info'
6565 self .assertEqual ("YouTube Embed <= 11.8.1 - Cross-Site Request Forgery (CSRF)" , finding .title )
66- self .assertEqual (datetime .datetime (2019 , 7 , 2 , 19 , 11 , 16 ), finding .date )
66+ self .assertEqual (datetime .datetime (2019 , 7 , 2 , 19 , 11 , 16 , tzinfo = datetime . UTC ), finding .date )
6767
6868 def test_parse_file_with_multiple_vuln (self ):
6969 with open ("unittests/scans/wpscan/wpscan.json" , encoding = "utf-8" ) as testfile :
@@ -81,15 +81,15 @@ def test_parse_file_with_multiple_vuln(self):
8181 self .assertEqual ("Contact Form 7 < 5.3.2 - Unrestricted File Upload" , finding .title )
8282 self .assertEqual (1 , len (finding .unsaved_vulnerability_ids ))
8383 self .assertEqual ("CVE-2020-35489" , finding .unsaved_vulnerability_ids [0 ])
84- self .assertEqual (datetime .datetime (2021 , 3 , 17 , 12 , 21 , 6 ), finding .date )
84+ self .assertEqual (datetime .datetime (2021 , 3 , 17 , 12 , 21 , 6 , tzinfo = datetime . UTC ), finding .date )
8585 self .assertEqual ("" , finding .get_scanner_confidence_text ()) # data are => 100%
8686
8787 with self .subTest (i = 4 ):
8888 finding = findings [4 ]
8989 self .assertIsNone (finding .unique_id_from_tool ) # interesting findings are not vlunerability
9090 self .assertEqual ("Info" , finding .severity ) # it is not a vulnerability so severity should be 'Info'
9191 self .assertEqual ("Interesting finding: WordPress readme found: http://example/readme.html" , finding .title )
92- self .assertEqual (datetime .datetime (2021 , 3 , 17 , 12 , 21 , 6 ), finding .date )
92+ self .assertEqual (datetime .datetime (2021 , 3 , 17 , 12 , 21 , 6 , tzinfo = datetime . UTC ), finding .date )
9393 self .assertEqual ("" , finding .get_scanner_confidence_text ()) # data are => "confidence": 100,
9494
9595 def test_parse_file_with_multiple_vuln_in_version (self ):
0 commit comments