This commit is contained in:
itay 2019-06-11 16:42:55 +03:00
parent 4d962feafe
commit 22815b7e02
1 changed files with 13 additions and 4 deletions

View File

@ -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)