Wuhp
Preserve program identity, broaden compatible root-scope pipelines and remove 100-target cap
75874b2 Download tests/test_config_limits.py from wuhp/bbscanner: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/wuhp/bbscanner/resolve/main/tests/test_config_limits.py
- Command line
-
hf download hf://spaces/wuhp/bbscanner/tests/test_config_limits.py
-
curl -L -o test_config_limits.py https://huggingface.co/spaces/wuhp/bbscanner/resolve/main/tests/test_config_limits.py
1.01 kB
| from app import config, main | |
| from fastapi.testclient import TestClient | |
| import pytest | |
| def test_config_defaults_match_models(): | |
| opts=main.PipelineOptions() | |
| assert opts.endpoint_limit==config.ENDPOINT_LIMIT_DEFAULT | |
| assert opts.gau_mode=="balanced" | |
| assert opts.httpx_limit==config.HTTPX_LIMIT_DEFAULT | |
| assert opts.katana_depth==config.KATANA_DEPTH_DEFAULT | |
| assert opts.zap_endpoint_limit==config.ZAP_ENDPOINT_LIMIT_DEFAULT | |
| assert opts.request_budget==config.ZAP_REQUEST_BUDGET_DEFAULT | |
| def test_queue_capacity_replaces_the_separate_active_batch_cap(): | |
| assert config.QUEUE_CAPACITY == 1000 | |
| assert not hasattr(config, "ACTIVE_BATCH_LIMIT") | |
| def test_passive_wait_budget_defaults_to_two_minutes_and_is_bounded(): | |
| assert main.PipelineOptions().zap_wait_seconds == 120 | |
| assert main.PipelineOptions(zap_wait_seconds=300).zap_wait_seconds == 300 | |
| for value in (0, 14, 301): | |
| with pytest.raises(ValueError): | |
| main.PipelineOptions(zap_wait_seconds=value) |