def test_zip_analysis(self): # Note: This is a workaround for CI try: self.fs.create_dir('tmp/') except OSError: pass args = pat.setup_parser().parse_args( 'zip --path tests/fixtures/valid_policies --out tmp/'.split()) return_code, out_filename = pat.zip_analysis(args) statinfo = os.stat(out_filename) assert_true(statinfo.st_size > 0) assert_equal(return_code, 0) assert_true(out_filename.endswith('.zip'))
def test_zip_analysis(self): # Note: This is a workaround for CI try: self.fs.create_dir('tmp/') except OSError: pass args = pat.setup_parser().parse_args( f'zip --path {DETECTIONS_FIXTURES_PATH}/valid_analysis --out tmp/'.split()) return_code, out_filename = pat.zip_analysis(args) assert_true(out_filename.startswith("tmp/")) statinfo = os.stat(out_filename) assert_true(statinfo.st_size > 0) assert_equal(return_code, 0) assert_true(out_filename.endswith('.zip'))