Skip to content

TestReverseDnsExpertBot.test_invalid_ptr fails because of DNS entry change #2206

Closed
@wagner-intevation

Description

@wagner-intevation
_________________________________________________________________________________________________ TestReverseDnsExpertBot.test_invalid_ptr __________________________________________________________________________________________________

self = <intelmq.tests.bots.experts.reverse_dns.test_expert.TestReverseDnsExpertBot testMethod=test_invalid_ptr>

    def test_invalid_ptr(self):
        self.input_message = INVALID_PTR_INP
        self.run_bot()
>       self.assertMessageEqual(0, INVALID_PTR_OUT)

intelmq/tests/bots/experts/reverse_dns/test_expert.py:88: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
intelmq/lib/test.py:563: in assertMessageEqual
    self.assertDictEqual(expected, event_dict)
E   AssertionError: {'__type': 'Event', 'source.ip': '31.210.115.39'} != {'source.ip': '31.210.115.39', 'source.reve[47 chars]ent'}
E   - {'__type': 'Event', 'source.ip': '31.210.115.39'}
E   + {'__type': 'Event',
E   +  'source.ip': '31.210.115.39',
E   +  'source.reverse_dns': 'show.generoustek.com'}

Finding a replacement IP address is probably very hard, so the only choice we have is to remove the test or to mock the DNS query.

Metadata

Metadata

Labels

bugIndicates an unexpected problem or unintended behaviorcomponent: tests

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions