From 06439d92f9d1e0e172a1f3b6ce5e9cb16c259942 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 12 Jul 2021 11:50:39 -0400 Subject: [PATCH] Island: Rename count_per_exploit -> num_exploited_per_exploit --- monkey/monkey_island/cc/services/ransomware_report.py | 2 +- .../monkey_island/cc/services/test_ransomware_report.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/monkey/monkey_island/cc/services/ransomware_report.py b/monkey/monkey_island/cc/services/ransomware_report.py index 691ae1fd3..65098daec 100644 --- a/monkey/monkey_island/cc/services/ransomware_report.py +++ b/monkey/monkey_island/cc/services/ransomware_report.py @@ -10,7 +10,7 @@ def get_propagation_stats() -> Dict: return { "num_scanned_nodes": len(scanned), "num_exploited_nodes": len(exploited), - "count_per_exploit": _get_exploit_counts(exploited), + "num_exploited_per_exploit": _get_exploit_counts(exploited), } diff --git a/monkey/tests/unit_tests/monkey_island/cc/services/test_ransomware_report.py b/monkey/tests/unit_tests/monkey_island/cc/services/test_ransomware_report.py index 6997d586c..5894d70ca 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/services/test_ransomware_report.py +++ b/monkey/tests/unit_tests/monkey_island/cc/services/test_ransomware_report.py @@ -29,9 +29,9 @@ def test_get_propagation_stats__num_exploited(): assert stats["num_exploited_nodes"] == 3 -def test_get_propagation_stats__count_per_exploit(): +def test_get_propagation_stats__num_exploited_per_exploit(): stats = ransomware_report.get_propagation_stats() - assert stats["count_per_exploit"]["SSH Exploiter"] == 2 - assert stats["count_per_exploit"]["SMB Exploiter"] == 1 - assert stats["count_per_exploit"]["WMI Exploiter"] == 1 + assert stats["num_exploited_per_exploit"]["SSH Exploiter"] == 2 + assert stats["num_exploited_per_exploit"]["SMB Exploiter"] == 1 + assert stats["num_exploited_per_exploit"]["WMI Exploiter"] == 1