From 483a3576d4f9db5f999ecd37464c531a1114ef6f Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Wed, 1 Apr 2020 09:52:38 +0300 Subject: [PATCH] Fixed unit test that gets mitigations from API --- .../cc/services/attack/test_mitre_api_interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/monkey_island/cc/services/attack/test_mitre_api_interface.py b/monkey/monkey_island/cc/services/attack/test_mitre_api_interface.py index cc3f485f9..b896828cb 100644 --- a/monkey/monkey_island/cc/services/attack/test_mitre_api_interface.py +++ b/monkey/monkey_island/cc/services/attack/test_mitre_api_interface.py @@ -7,8 +7,8 @@ class TestMitreApiInterface(TestCase): def test_get_all_mitigations(self): mitigations = MitreApiInterface.get_all_mitigations() - self.assertTrue((len(mitigations) >= 282)) - mitigation = mitigations[0] + self.assertTrue((len(mitigations.items()) >= 282)) + mitigation = next(iter(mitigations.values())) self.assertEqual(mitigation['type'], "course-of-action") self.assertTrue(mitigation['name']) self.assertTrue(mitigation['description'])