forked from xmendez/wfuzz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Xavi Mendez
committed
Oct 31, 2020
1 parent
8245875
commit a124724
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |