Esempio n. 1
0
 def test_valid_pack_spec(self):
     pack_loaded = False
     for spec_filename, _, loaded_spec, _ in pat.load_analysis_specs([DETECTIONS_FIXTURES_PATH]):
         if spec_filename.endswith('sample-pack.yml'):
             assert_is_instance(loaded_spec, dict)
             assert_true(loaded_spec != {})
             pack_loaded = True
     assert_true(pack_loaded)
 def test_valid_pack_spec(self):
     pack_loaded = False
     for spec_filename, _, loaded_spec, _ in pat.load_analysis_specs(
         ['tests/fixtures']):
         if spec_filename.endswith('sample-pack.yml'):
             assert_is_instance(loaded_spec, dict)
             assert_true(loaded_spec != {})
             pack_loaded = True
     assert_true(pack_loaded)
Esempio n. 3
0
 def test_valid_yaml_policy_spec(self):
     for spec_filename, _, loaded_spec, _ in pat.load_analysis_specs(
         [FIXTURES_PATH]):
         if spec_filename.endswith('example_policy.yml'):
             assert_is_instance(loaded_spec, dict)
             assert_true(loaded_spec != {})
 def test_valid_yaml_policy_spec(self):
     for spec_filename, _, loaded_spec in pat.load_analysis_specs(
             'tests/fixtures'):
         if spec_filename == 'example_policy.yml':
             assert_is_instance(loaded_spec, dict)
             assert_true(loaded_spec != {})
 def test_valid_json_policy_spec(self):
     for spec_filename, _, loaded_spec, _ in pat.load_analysis_specs(
         ['tests/fixtures']):
         if spec_filename.endswith('example_policy.json'):
             assert_is_instance(loaded_spec, dict)
             assert_true(loaded_spec != {})