def test_init_yara_python_not_installed(self, outputs):
with patch.dict('sys.modules', **{
'yara': None,
}):
from fibratus.binding.yar import YaraBinding
with pytest.raises(BindingError) as e:
YaraBinding(outputs,
Mock(spec_set=Logger), output='amqp', path='C:\\yara-rules')
assert 'yara-python package is not installed' in str(e.value)
评论列表
文章目录