def testRemoveDuplicates(self): names = filterName.getNames(self.testString) D = filterName.deleteDuplicates(names) namecount = True for name in self.exampleNames: if D[name] != 3: namecount = False self.assertEqual(namecount, True)
def testNameSearchHyphen(self): names = filterName.getNames(self.testString3) self.assertIn("Brian O-Malley", names)
def testNameSearchApostrophe(self): names = filterName.getNames(self.testString2) self.assertIn("Brian O'Malley", names)
def testNameSearchSimple(self): names = filterName.getNames(self.testString) self.assertIn("Eric Chen", names)
def testNameSearchSimpleSurnames(self): """should not match to a name such as Mr. Smith""" names = filterName.getNames(self.testStringSurnames) self.assertNotIn("Smith", names)