import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parents[1])) import app def test_hash_normalization_sha256(): value = "a" * 64 result = app.infer_object(value, "Auto") assert result["object_type"] == "hash" assert result["hash_algorithm"] == "sha256" assert result["safe_to_lookup"] is True def test_url_normalization(): result = app.infer_object("https://example.com/path?q=1", "Auto") assert result["object_type"] == "url" assert result["safe_to_lookup"] is True def test_domain_normalization(): result = app.infer_object("Example.COM", "Auto") assert result["object_type"] == "domain" assert result["normalized_value"] == "example.com" def test_ip_normalization(): result = app.infer_object("8.8.8.8", "Auto") assert result["object_type"] == "ip"