Skip to content

Commit

Permalink
Merge pull request #2504 from certtools/fix-ripe-test
Browse files Browse the repository at this point in the history
tst: fix IP address and abuse contact of example.com
  • Loading branch information
sebix authored Jun 26, 2024
2 parents f9474b2 + 9c3c281 commit c5f4b01
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions intelmq/tests/bots/experts/ripe/test_expert.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
from intelmq.bots.experts.ripe.expert import RIPEExpertBot

EXAMPLE_INPUT = {"__type": "Event",
"source.ip": "93.184.216.34", # example.com
"source.ip": "93.184.215.14", # example.com
"destination.ip": "193.238.157.5", # funkfeuer.at
"destination.asn": 35492,
"time.observation": "2015-01-01T00:00:00+00:00",
}
EXAMPLE_OUTPUT = {"__type": "Event",
"source.ip": "93.184.216.34",
"source.abuse_contact": "abuse@verizondigitalmedia.com",
"source.ip": "93.184.215.14",
"source.abuse_contact": "abuse@edg.io",
"destination.ip": "193.238.157.5",
"destination.abuse_contact": "[email protected]",
"destination.asn": 35492,
Expand Down Expand Up @@ -106,7 +106,7 @@ def test_db_ipv4_lookup(self):
self.run_bot()
self.assertMessageEqual(0, EXAMPLE_OUTPUT)
self.assertEqual(self.cache.get('db_asn:35492'), b'["[email protected]"]')
self.assertEqual(self.cache.get('db_ip:93.184.216.34'), b'["abuse@verizondigitalmedia.com"]')
self.assertEqual(self.cache.get('db_ip:93.184.215.14'), b'["abuse@edg.io"]')
self.assertEqual(self.cache.get('db_ip:193.238.157.5'), b'["[email protected]"]')

def test_db_ipv6_lookup(self):
Expand Down Expand Up @@ -196,7 +196,7 @@ def test_ripe_db_ip_errors(self, mocker):
})
old = self.bot.QUERY['db_ip']
self.bot.QUERY['db_ip'] = 'http://localhost/{}'
mocker.get('/93.184.216.34', status_code=404)
mocker.get('/93.184.215.14', status_code=404)
mocker.get('/193.238.157.5', status_code=404)

self.run_bot(prepare=False,
Expand Down

0 comments on commit c5f4b01

Please sign in to comment.