test_SalityBotnet.py 725 B

1234567891011121314151617
  1. import unittest.mock as mock
  2. import ID2TLib.TestLibrary as Lib
  3. import Test.ID2TAttackTest as Test
  4. sha_botnet_basic = 'fa16b25b8bad5e03c47e195c1c73f80d5667c4445d16aca44dbb390ade3c0d4f'
  5. sha_botnet_most_used_ip_in_list = 'fa16b25b8bad5e03c47e195c1c73f80d5667c4445d16aca44dbb390ade3c0d4f'
  6. class UnitTestSalityBotnet(Test.ID2TAttackTest):
  7. def test_botnet_basic(self):
  8. self.checksum_test([['SalityBotnet']], sha_botnet_basic)
  9. @mock.patch('Core.Statistics.Statistics.get_most_used_ip_address')
  10. def test_botnet_most_used_ip(self, mock_most_used_ip_address):
  11. mock_most_used_ip_address.return_value = Lib.test_pcap_ips[0]
  12. self.checksum_test([['SalityBotnet']], sha_botnet_most_used_ip_in_list)