@@ -17,28 +17,28 @@ async def test_python_api():
1717 scan_home = scan2 .helpers .scans_dir / "python_api_test"
1818 out_file = scan_home / "output.json"
1919 assert list (scan2 .helpers .read_file (out_file ))
20- scan_log = scan_home / "scan.log"
21- debug_log = scan_home / "debug.log"
20+ scan_log = scan_home / "scan.log.gz "
21+ debug_log = scan_home / "debug.log.gz "
2222 assert scan_log .is_file ()
23- assert "python_api_test" in open (scan_log ). read ( )
23+ assert "python_api_test" in read_gzipped_file (scan_log )
2424 assert debug_log .is_file ()
25- assert "python_api_test" in open (debug_log ). read ( )
25+ assert "python_api_test" in read_gzipped_file (debug_log )
2626
2727 scan3 = Scanner ("127.0.0.1" , output_modules = ["json" ], scan_name = "scan_logging_test" )
2828 await scan3 .async_start_without_generator ()
2929
30- assert "scan_logging_test" not in open (scan_log ). read ( )
31- assert "scan_logging_test" not in open (debug_log ). read ( )
30+ assert "scan_logging_test" not in read_gzipped_file (scan_log )
31+ assert "scan_logging_test" not in read_gzipped_file (debug_log )
3232
3333 scan_home = scan3 .helpers .scans_dir / "scan_logging_test"
3434 out_file = scan_home / "output.json"
3535 assert list (scan3 .helpers .read_file (out_file ))
36- scan_log = scan_home / "scan.log"
37- debug_log = scan_home / "debug.log"
36+ scan_log = scan_home / "scan.log.gz "
37+ debug_log = scan_home / "debug.log.gz "
3838 assert scan_log .is_file ()
3939 assert debug_log .is_file ()
40- assert "scan_logging_test" in open (scan_log ). read ( )
41- assert "scan_logging_test" in open (debug_log ). read ( )
40+ assert "scan_logging_test" in read_gzipped_file (scan_log )
41+ assert "scan_logging_test" in read_gzipped_file (debug_log )
4242
4343 # make sure config loads properly
4444 bbot_home = "/tmp/.bbot_python_api_test"
0 commit comments