This commit is contained in:
Alexander Myasoedov
2025-12-24 08:16:21 +02:00
parent 2dc41af98d
commit a9adb22458
13 changed files with 56 additions and 51 deletions
-2
View File
@@ -1,8 +1,6 @@
"""Tests for CircuitBreaker."""
import pytest
import time
from unittest.mock import patch
from agentic_security.executor.circuit_breaker import CircuitBreaker
+5 -2
View File
@@ -2,7 +2,7 @@
import pytest
import asyncio
from unittest.mock import Mock, patch, AsyncMock
from unittest.mock import Mock, patch
from agentic_security.executor.concurrent import ConcurrentExecutor, ExecutorMetrics
from agentic_security.probe_actor.state import FuzzerState
@@ -268,7 +268,10 @@ class TestConcurrentExecutor:
# 5 requests with rate=5/s and burst=2
# First 2 immediate, next 3 should take ~0.6s total
await executor.execute_batch(
request_factory, ["p1", "p2", "p3", "p4", "p5"], "test_module", fuzzer_state
request_factory,
["p1", "p2", "p3", "p4", "p5"],
"test_module",
fuzzer_state,
)
elapsed = time.monotonic() - start
-1
View File
@@ -3,7 +3,6 @@
import asyncio
import pytest
import time
from unittest.mock import patch
from agentic_security.executor.rate_limiter import TokenBucketRateLimiter