Rework test to check value in a list

pull/9/head
Ilya Glotov 2020-04-23 16:48:35 +03:00
parent 5fe0d7fd6b
commit ea2093ef0c
No known key found for this signature in database
GPG Key ID: 5862B629BFB84D34
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class TestPyMISPWarningLists(unittest.TestCase):
results = self.warninglists.search('2001:DB8::34:1') results = self.warninglists.search('2001:DB8::34:1')
self.assertEqual(results[0].name, 'List of RFC 3849 CIDR blocks') self.assertEqual(results[0].name, 'List of RFC 3849 CIDR blocks')
results = self.warninglists.search('1e100.net') results = self.warninglists.search('1e100.net')
self.assertEqual(results[0].name, 'List of known google domains') self.assertTrue('List of known google domains' in [r.name for r in results])
results = self.warninglists.search('something.files.1drv.com') results = self.warninglists.search('something.files.1drv.com')
self.assertTrue('List of known microsoft domains' in [r.name for r in results]) self.assertTrue('List of known microsoft domains' in [r.name for r in results])
results = self.warninglists.search('arbitrary-domain-1e100.net') results = self.warninglists.search('arbitrary-domain-1e100.net')