From e4cd06d8c309c1b6dd0109813be0349b5171069c Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 12 Jul 2021 12:00:14 -0400 Subject: [PATCH] Island: Move ransomware_report.py to ransomware/ransomware_report.py --- monkey/monkey_island/cc/resources/ransomware_report.py | 6 ++++-- .../cc/services/{ => ransomware}/ransomware_report.py | 0 .../cc/services/{ => ransomware}/test_ransomware_report.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) rename monkey/monkey_island/cc/services/{ => ransomware}/ransomware_report.py (100%) rename monkey/tests/unit_tests/monkey_island/cc/services/{ => ransomware}/test_ransomware_report.py (94%) diff --git a/monkey/monkey_island/cc/resources/ransomware_report.py b/monkey/monkey_island/cc/resources/ransomware_report.py index 93a318114..cb5923468 100644 --- a/monkey/monkey_island/cc/resources/ransomware_report.py +++ b/monkey/monkey_island/cc/resources/ransomware_report.py @@ -2,10 +2,12 @@ import flask_restful from flask import jsonify from monkey_island.cc.resources.auth.auth import jwt_required -from monkey_island.cc.services.ransomware_report import get_propagation_stats +from monkey_island.cc.services.ransomware import ransomware_report class RansomwareReport(flask_restful.Resource): @jwt_required def get(self): - return jsonify({"report": None, "propagation_stats": get_propagation_stats()}) + return jsonify( + {"report": None, "propagation_stats": ransomware_report.get_propagation_stats()} + ) diff --git a/monkey/monkey_island/cc/services/ransomware_report.py b/monkey/monkey_island/cc/services/ransomware/ransomware_report.py similarity index 100% rename from monkey/monkey_island/cc/services/ransomware_report.py rename to monkey/monkey_island/cc/services/ransomware/ransomware_report.py diff --git a/monkey/tests/unit_tests/monkey_island/cc/services/test_ransomware_report.py b/monkey/tests/unit_tests/monkey_island/cc/services/ransomware/test_ransomware_report.py similarity index 94% rename from monkey/tests/unit_tests/monkey_island/cc/services/test_ransomware_report.py rename to monkey/tests/unit_tests/monkey_island/cc/services/ransomware/test_ransomware_report.py index 5894d70ca..4b3493e82 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/services/test_ransomware_report.py +++ b/monkey/tests/unit_tests/monkey_island/cc/services/ransomware/test_ransomware_report.py @@ -1,6 +1,6 @@ import pytest -import monkey_island.cc.services.ransomware_report as ransomware_report +from monkey_island.cc.services.ransomware import ransomware_report from monkey_island.cc.services.reporting.report import ReportService TEST_SCANNED_RESULTS = [{}, {}, {}, {}]