mirror of
https://github.com/laramies/theHarvester.git
synced 2026-08-22 05:42:22 +02:00
* Model active evidence in result persistence * Expose active action diagnostics * Persist truthful DNS action evidence * Persist direct action evidence * feat: add authenticated durable run API v1 * Make API file interchange JSONL-only * Harden API evidence boundaries * Remove API rate limiter * Unify API runs with result persistence * Support target action runs * Keep DNS resolver selection action-neutral * Add action-neutral CLI resolver selection * Preserve API evidence across JSONL round trips * Complete HarvestView API run parity * Harden HarvestView run API contracts * Remove obsolete bundled network snapshots Delete the unused bundled AWS IP-range and resolver snapshots while preserving operator-supplied resolver file input. * refactor: canonicalize URL results * docs: define a bounded test budget * Standardize hostname and IP result names * fix(api): avoid duplicate evidence conflicts
26 lines
798 B
Python
26 lines
798 B
Python
from __future__ import annotations
|
|
|
|
from theHarvester.lib.output import configure_logging, print_linkedin_people, sorted_unique
|
|
|
|
|
|
def test_sorted_unique_sorts_and_deduplicates() -> None:
|
|
assert sorted_unique(['b', 'a', 'b']) == ['a', 'b']
|
|
|
|
|
|
def test_print_linkedin_people_reports_no_users(capsys) -> None:
|
|
configure_logging(verbose=False)
|
|
print_linkedin_people(engines=['linkedin'], people=[])
|
|
|
|
out = capsys.readouterr().out
|
|
assert 'No LinkedIn users found' in out
|
|
|
|
|
|
def test_print_linkedin_people_prints_people(capsys) -> None:
|
|
configure_logging(verbose=False)
|
|
print_linkedin_people(engines=['rocketreach'], people=['bob', 'alice', 'bob'])
|
|
|
|
out = capsys.readouterr().out
|
|
assert 'LinkedIn Users found: 3' in out
|
|
assert 'alice' in out
|
|
assert 'bob' in out
|