Ejemplo n.º 1
0
 def test_positive_scan_column(self):
     col = Column('col')
     col.scan('Jonathan Smith', [RegexScanner(), NERScanner()])
     self.assertTrue(col.has_pii())
     self.assertEqual({
         'pii_types': [PiiTypes.PERSON],
         'name': 'col'
     }, col.get_dict())
 def test_positive_scan_column(self):
     col = Column("col")
     col.scan("Jonathan Smith", [RegexScanner(), NERScanner()])
     self.assertTrue(col.has_pii())
     self.assertEqual({
         "pii_types": [PiiTypes.PERSON],
         "name": "col"
     }, col.get_dict())
Ejemplo n.º 3
0
 def test_null_scan_column(self):
     col = Column('col')
     col.scan(None, [RegexScanner(), NERScanner()])
     self.assertFalse(col.has_pii())
     self.assertEqual({'pii_types': [], 'name': 'col'}, col.get_dict())
 def test_null_scan_column(self):
     col = Column("col")
     col.scan(None, [RegexScanner(), NERScanner()])
     self.assertFalse(col.has_pii())
     self.assertEqual({"pii_types": [], "name": "col"}, col.get_dict())