def address_test(): data = "1015 East Brooks street, Norman" (add, stats) = redact.find_address(data) (loc, stats) = redact.find_locs(data) data = redact.redact_text(data, add) data = redact.redact_text(data, loc) assert data == '████████████████████████ ██████, ████████' assert data is not None
def location_test(): data = "I live in Shibuya." (locs, stats) = redact.find_locs(data) data = redact.redact_text(data, locs) assert data == 'I live in ███████.' assert data is not None
def mnumber_test(): data = "My number is 4055619046." (num, stats) = redact.find_numbers(data) data = redact.redact_text(data, num) assert data == 'My number is ██████████.' assert data is not None
def date_test(): data = "I blow my candles on 09/16/1996" (dates, stats) = redact.find_dates(data) data = redact.redact_text() assert data == 'I blow my candles on ██████████' assert data is not None
def nametest(): data = "My name is Abilash. I work with Gintoki." (names, stats) = redact.find_names(data) redacted = redact.redact_text(data, names) assert redacted == 'My name is ███████. I work with ███████.' assert redacted is not None