-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2504 from certtools/fix-ripe-test
tst: fix IP address and abuse contact of example.com
- Loading branch information
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, | ||
|
@@ -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): | ||
|
@@ -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, | ||
|