"""Tests for the WordPress-over-SSH pull importer (Panel Improvements #3). Covers: wp-config probe parsing, host-key fingerprint pinning (mismatch rejection), the SSRF host guard (metadata/loopback), tar traversal guards, the full job step sequence with every remote exec stubbed, and the admin API (auth + happy path with the enqueue stubbed). """ import io import os import tarfile import pytest from app.services import wordpress_bridge def _svc(): return wordpress_bridge.get('wp_ssh_import_service', 'WpSshImportService') def _err(): return wordpress_bridge.get('wp_ssh_import_service', 'WpSshImportError') WP_CONFIG_FIXTURE = """