From 1de511b1ed882f21e9b69c8c10de0f315a40183e Mon Sep 17 00:00:00 2001 From: Ace Pace Date: Wed, 6 May 2020 00:01:50 +0300 Subject: [PATCH] Remove some more PEP8 --- monkey/monkey_island/cc/models/zero_trust/test_finding.py | 3 ++- monkey/monkey_island/cc/services/attack/attack_config.py | 4 ++-- .../cc/services/attack/technique_reports/T1136.py | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/monkey/monkey_island/cc/models/zero_trust/test_finding.py b/monkey/monkey_island/cc/models/zero_trust/test_finding.py index 4299f7eb4..f54884f0a 100644 --- a/monkey/monkey_island/cc/models/zero_trust/test_finding.py +++ b/monkey/monkey_island/cc/models/zero_trust/test_finding.py @@ -33,7 +33,8 @@ class TestFinding(IslandTestCase): event_example = Event.create_event( title="Event Title", message="event message", event_type=zero_trust_consts.EVENT_TYPE_MONKEY_NETWORK) - Finding.save_finding(test=zero_trust_consts.TEST_SEGMENTATION, status=zero_trust_consts.STATUS_FAILED, events=[event_example]) + Finding.save_finding(test=zero_trust_consts.TEST_SEGMENTATION, + status=zero_trust_consts.STATUS_FAILED, events=[event_example]) self.assertEqual(len(Finding.objects(test=zero_trust_consts.TEST_SEGMENTATION)), 1) self.assertEqual(len(Finding.objects(status=zero_trust_consts.STATUS_FAILED)), 1) diff --git a/monkey/monkey_island/cc/services/attack/attack_config.py b/monkey/monkey_island/cc/services/attack/attack_config.py index 2830a2dc9..fe1b3263d 100644 --- a/monkey/monkey_island/cc/services/attack/attack_config.py +++ b/monkey/monkey_island/cc/services/attack/attack_config.py @@ -120,7 +120,7 @@ class AttackConfig(object): def set_bool_conf_val(path, val, monkey_config): """ Changes monkey's configuration by setting one of its boolean fields value - :param path: Path to boolean value in monkey's configuration. E.g. ['monkey', 'system_info', 'should_use_mimikatz'] + :param path: Path to boolean value in monkey's configuration. ['monkey', 'system_info', 'should_use_mimikatz'] :param val: Boolean :param monkey_config: Monkey's configuration """ @@ -183,5 +183,5 @@ class AttackConfig(object): techniques = {} for type_name, attack_type in list(attack_config.items()): for key, technique in list(attack_type['properties'].items()): - techniques[key] = {'selected': technique['value'], 'type': SCHEMA['properties'][type_name]['title']} + techniques[key] = {'selected': technique['value'], 'type': SCHEMA['properties'][type_name]['title']} return techniques diff --git a/monkey/monkey_island/cc/services/attack/technique_reports/T1136.py b/monkey/monkey_island/cc/services/attack/technique_reports/T1136.py index 777476473..04450d4a6 100644 --- a/monkey/monkey_island/cc/services/attack/technique_reports/T1136.py +++ b/monkey/monkey_island/cc/services/attack/technique_reports/T1136.py @@ -2,7 +2,6 @@ from monkey_island.cc.services.attack.technique_reports import AttackTechnique from monkey_island.cc.services.reporting.report import ReportService from common.utils.attack_utils import ScanStatus from common.data.post_breach_consts import POST_BREACH_BACKDOOR_USER, POST_BREACH_COMMUNICATE_AS_NEW_USER -from monkey_island.cc.models import Monkey __author__ = "shreyamalviya"