def test_scrub_string_url(self): data = 'this is my Web site http://example.org/?param=12 !' res = scrubber.scrub_string(data, scrubber.URL) eq_(res, 'this is my Web site !') data = 'link www.example.org/?param=12' res = scrubber.scrub_string(data, scrubber.URL) eq_(res, 'link ')
def scrub_pii(content): content = scrubber.scrub_string(content, scrubber.EMAIL, '(email removed)') content = scrubber.scrub_string(content, scrubber.URL, '(URL removed)') return content
def test_scrub_string_email(self): data = 'this is my email [email protected]!' res = scrubber.scrub_string(data, scrubber.EMAIL) eq_(res, 'this is my email !')
def scrub_pii(content): return scrubber.scrub_string(content, scrubber.EMAIL, '(email removed)')