From 22815b7e0273085eb00e924987bfe009a7d5cf8a Mon Sep 17 00:00:00 2001 From: itay Date: Tue, 11 Jun 2019 16:42:55 +0300 Subject: [PATCH] Fix test --- .../telemetry/attack/test_victim_host_telem.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/monkey/infection_monkey/telemetry/attack/test_victim_host_telem.py b/monkey/infection_monkey/telemetry/attack/test_victim_host_telem.py index 0feb33b75..753236131 100644 --- a/monkey/infection_monkey/telemetry/attack/test_victim_host_telem.py +++ b/monkey/infection_monkey/telemetry/attack/test_victim_host_telem.py @@ -13,8 +13,17 @@ class TestVictimHostTelem(TestCase): telem = VictimHostTelem(technique, status, machine) - self.assertEqual(telem.technique, technique) - self.assertEqual(telem.status, status) self.assertEqual(telem.telem_type, 'attack') - self.assertEqual(telem.machine['domain_name'], machine.domain_name) - self.assertEqual(telem.machine['ip_addr'], machine.ip_addr) + + expected_data = { + 'machine': { + 'domain_name': machine.domain_name, + 'ip_addr': machine.ip_addr + }, + 'status': status.value, + 'technique': technique + } + + actual_data = telem.get_data() + + self.assertEqual(actual_data, expected_data)