aboutsummaryrefslogtreecommitdiffstats
path: root/test/examples
Commit message (Collapse)AuthorAgeFilesLines
* [test/xss_scanner] add fixtures in testsDavid Kremer2018-08-151-35/+40
| | | | | | | | | | The previous version of that script made a repetitive use of the pytest builtin fixture, with always the same arguments. This is a small refactoring and cleanup, mainly adding the 'function' scope to ensure proper cleaning and using the @pytest.fixture decorator where I could.
* test: shift test_data out of our public APIAldo Cortesi2018-04-232-28/+24
|
* Revamp verbosity optionsAldo Cortesi2018-02-261-0/+3
| | | | | | | | | | Split verbosity into termlog_verbosity and console_eventlog_verbosity. This patch also removes printing to console if there are unknown options in the command-line. Options now live in separate addons, so having uknown options remaining is common and expected. We definitely shoould have some other way for users to see what was ignored so they can catch typos and the like, but that's a different patch.
* Fix test fails in test_xss_scanner when running tox without internet ↵Deepesh Pathak2018-02-241-0/+9
| | | | | | | | connections. - Add mock implementation for gethostbyname in test_xss_scanner. - Fix failed tests when running tox without internet connection. - Fixes #2867
* Extend mypy checking, fix #2194 (#2819)Arushit Mudgal2018-02-031-4/+4
|
* Added scanning for CSS injection and iframe injectionDavid Dworken2017-10-171-1/+7
|
* Addons and addon testingAldo Cortesi2017-04-262-114/+86
| | | | | | | | - Fix some loading sequence bugs affecting command-line script invocation - Allow addons to over-ride existing options (with a warning). We need this for reloading. - Convert har_dump to new-style arguments, fix and re-instate its test suite. - Covnert miscelaneous other exmples to new-style args.
* Remove watchdog, solidify script testingAldo Cortesi2017-04-261-67/+51
| | | | | | | | - Remove the watchdog dependency. We now just stat the script file every 2 seconds to check for an updated mtime. - Further solidify our script testing, and in particular make the example tests nicer. These should exemplify how we want users to test their own addon scripts. More work on addon testing to follow.
* Revamp how addons workAldo Cortesi2017-04-252-17/+14
| | | | | | | | | | | | | | | | | | | - Addons now nest, which means that addons can manage addons. This has a number of salutary effects - the scripts addon no longer has to poke into the global addons list, we no longer have to replace/remove/boot-outof parent addons when we load scripts, and this paves the way for making our top-level tools into addons themselves. - All addon calls are now wrapped in a safe execution environment where exceptions are caught, and output to stdout/stderr are intercepted and turned into logs. - We no longer support script arguments in sys.argv - creating an option properly is the only way to pass arguments. This means that all scripts are always directly controllable from interctive tooling, and that arguments are type-checked. For now, I've disabled testing of the har dump example - it needs to be moved to the new argument handling, and become a class addon. I'll address that in a separate patch.
* move examples tests (#2199)Thomas Kriechbaumer2017-03-224-0/+602