From 674ac7dd13b2ee94e88ec7a2860a4df175acb880 Mon Sep 17 00:00:00 2001 From: anti Date: Tue, 28 Apr 2026 13:01:37 -0400 Subject: [PATCH] test(db): cover BaseRepository.update_identity_fingerprints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DummyRepo couldn't instantiate — TLS-cert fingerprint rollup added a new abstract method without a stub here. Add the override and a call site so the abstract pass body is hit. --- tests/db/test_base_repo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/db/test_base_repo.py b/tests/db/test_base_repo.py index 271e6fc0..ed44c8c5 100644 --- a/tests/db/test_base_repo.py +++ b/tests/db/test_base_repo.py @@ -71,6 +71,8 @@ class DummyRepo(BaseRepository): async def set_attacker_identity_id(self, a, i): await super().set_attacker_identity_id(a, i) async def list_all_identities(self): await super().list_all_identities(); return [] async def update_identity_merged_into(self, u, w): await super().update_identity_merged_into(u, w) + async def update_identity_fingerprints(self, u, *, ja3_hashes=None, hassh_hashes=None, tls_cert_sha256=None): + await super().update_identity_fingerprints(u, ja3_hashes=ja3_hashes, hassh_hashes=hassh_hashes, tls_cert_sha256=tls_cert_sha256) # Campaign clustering (this PR) async def get_campaign_by_uuid(self, u): await super().get_campaign_by_uuid(u) async def list_campaigns(self, limit=50, offset=0): await super().list_campaigns(limit, offset); return [] @@ -155,6 +157,7 @@ async def test_base_repo_coverage(): await dr.list_all_identities() await dr.update_identity_merged_into("a", "b") await dr.update_identity_merged_into("a", None) + await dr.update_identity_fingerprints("a", ja3_hashes='["x"]', hassh_hashes=None, tls_cert_sha256='["y"]') await dr.get_campaign_by_uuid("a") await dr.list_campaigns() await dr.count_campaigns()