File size: 846 Bytes
d2ae92a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 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"
|