[7fc5df]: / tests / surrogates / generators / test_email.py

Download this file

20 lines (14 with data), 478 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
from deidentify.surrogates.generators import EmailSurrogates
from .util import RandomDataMock
def test_replace_all():
annotations = [
'jan.janssen@gmail.com',
'jan.janssen@com.com',
'Abc-aBc@com3.com'
]
email_surrogates = EmailSurrogates(annotations=annotations, random_data=RandomDataMock())
assert email_surrogates.replace_all() == [
'ccc.ccccccc@ccccc.com',
'ccc.ccccccc@ccc.com',
'Ccc-cCc@ccc1.com'
]