Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/integration/test_pipeline.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
from unittest.mock import patch, MagicMock
from cyberai.core.config import CyberAIConfig
from cyberai.core.session import PentestSession, SessionState, Finding, Severity

Expand Down
3 changes: 1 addition & 2 deletions tests/integration/test_reality_probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
reality-probe integration tests — mock client, no live server needed.
"""

import pytest
from unittest.mock import MagicMock, patch
from unittest.mock import MagicMock
from cyberai.integrations.reality_probe_client import RealityProbeClient, TLSResult
from cyberai.agents.recon.tls_tool import TLSTool
from cyberai.agents.intel.tls_cve_mapper import TLSCVEMapper
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_attack_metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
from cyberai.agents.exploit.attack_metadata import (
enrich_attack_path,
enrich_all,
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_cache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import pytest
import time
from pathlib import Path
from cyberai.core.cache import FileCache


Expand Down
2 changes: 0 additions & 2 deletions tests/unit/test_cve_scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
score_cve,
score_all,
CVEScore,
CVSS_WEIGHT,
EXPLOIT_WEIGHT,
RECENCY_WEIGHT,
EPSS_WEIGHT,
)

Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_exploit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
from cyberai.agents.exploit.cvss_analyzer import analyze_attack_vector
from cyberai.agents.exploit.chain_builder import build_exploit_chain

Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_html_renderer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
from pathlib import Path
from cyberai.agents.report.html_renderer import (
render_html_report,
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_intel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
from cyberai.agents.intel.service_mapper import ports_to_queries, score_to_severity
from cyberai.agents.intel.nvd_client import _parse_cves

Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_intel_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from unittest.mock import patch

import pytest

from cyberai.agents.intel.agent import IntelAgent, IntelAgentV2, _normalize
from cyberai.core.config import CyberAIConfig
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/test_orchestrator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
from unittest.mock import patch, MagicMock
from unittest.mock import patch
from cyberai.core.orchestrator import Orchestrator
from cyberai.core.scan_session import ScanPhase, ScanState

Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_orchestrator_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from __future__ import annotations

import pytest
from click.testing import CliRunner

from cyberai.__main__ import cli
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_phantom_grid.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
from unittest.mock import patch, MagicMock
from cyberai.integrations.phantom_grid import PhantomGridClient, OOBInteraction
from cyberai.integrations.oob_payloads import (
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_rate_limiter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
import time
from cyberai.core.rate_limiter import (
RateLimiter,
Expand Down
3 changes: 0 additions & 3 deletions tests/unit/test_recon.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import pytest
from unittest.mock import patch, MagicMock
from cyberai.agents.recon.nmap_tool import _parse_ports
from cyberai.agents.recon.dns_tool import run_dns


def test_parse_ports_empty():
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_report.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
from datetime import datetime, timezone
from cyberai.core.session import PentestSession, Finding, Severity
from cyberai.agents.report.markdown_renderer import render_markdown
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_risk_prioritizer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
from cyberai.agents.intel.risk_prioritizer import prioritize, group_by_tier, summarize

CVES = [
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/test_safety_validator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import pytest
from cyberai.agents.exploit.safety_validator import (
validate_exploit_scope,
_check_target_ip,
_target_in_scope,
)

Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_scan_session.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
from cyberai.core.scan_session import ScanSession, ScanState, ScanPhase, PhaseResult


Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_security.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
from cyberai.core.security.injection_detector import detect_injection, scan_messages
from cyberai.core.security.input_sanitizer import (
sanitize_target,
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_session_shim.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

def test_legacy_imports_still_work():
from cyberai.core.session import (
Finding,
PentestSession,
Finding, # noqa: F401 — shim must re-export this legacy name
PentestSession, # noqa: F401 — shim must re-export this legacy name
Severity,
SessionState,
)
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_subdomain_enum.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
from unittest.mock import patch
from cyberai.agents.recon.subdomain_enum import (
enumerate_subdomains,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_tool_calling.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

import json
from typing import Any, Dict, List
from typing import Any, Dict
from unittest.mock import MagicMock

import pytest
Expand Down
Loading