Skip to content

Commit

Permalink
test for is_visible
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavi Mendez committed Oct 31, 2020
1 parent 8245875 commit a124724
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tests/plugins/test_summary.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from wfuzz.factories.plugin_factory import plugin_factory
from wfuzz.fuzzobjects import FuzzPlugin

from queue import Queue


def test_sum_plugin_output(example_full_fuzzres):
plugin = plugin_factory.create("plugin_from_summary", "a message")

assert plugin.is_visible(True) is False
assert plugin.is_visible(False) is True


def test_find_plugin_output_from_factory():
plugin = plugin_factory.create(
"plugin_from_finding",
"a plugin",
"a source",
"an issue",
"some data",
FuzzPlugin.INFO,
)

assert plugin.is_visible(True) is True
assert plugin.is_visible(False) is False


def test_find_plugin_output(get_plugin):
plugin = get_plugin("links")[0]
plugin.results_queue = Queue()
plugin.add_result("a source", "an issue", "some data", FuzzPlugin.INFO)

plugin_res = plugin.results_queue.get()

assert plugin_res.is_visible(True) is True
assert plugin_res.is_visible(False) is False

0 comments on commit a124724

Please sign in to comment.