fix: [tests] don't die if duplicates, but report them in the right test

pull/27/head
Christophe Vandeplas 2024-06-18 17:54:35 +02:00
parent 47ed9cb26f
commit acfb1e4493
No known key found for this signature in database
GPG Key ID: BDC48619FFDC5A5B
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ class TestPyMISPGalaxies(unittest.TestCase):
def setUp(self):
self.galaxies = Galaxies()
self.clusters = Clusters(skip_duplicates=False)
self.clusters = Clusters(skip_duplicates=True)
self.maxDiff = None
def test_searchable(self):
@ -36,7 +36,7 @@ class TestPyMISPGalaxies(unittest.TestCase):
to_print = Counter(c.duplicates)
for entry, counter in to_print.items():
print(counter + 1, entry)
self.assertFalse(has_duplicates)
self.assertFalse(has_duplicates, msg="Duplicates found")
def test_dump_galaxies(self):
galaxies_from_files = {}

View File

@ -9,7 +9,7 @@ class TestPyMISPGalaxiesApi(unittest.TestCase):
def setUp(self):
self.galaxies = Galaxies()
self.clusters = Clusters(skip_duplicates=False)
self.clusters = Clusters(skip_duplicates=True)
self.maxDiff = None
def test_get_by_external_id(self):