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 = '72c537fba918154dbe937694d8da87260bebb05c0ad20802051fa80107c1efbe'
  5. sha_botnet_most_used_ip_in_list = '72c537fba918154dbe937694d8da87260bebb05c0ad20802051fa80107c1efbe'
  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)