Example #1
0
    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 ')
Example #2
0
    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 ')
Example #3
0
def scrub_pii(content):
    content = scrubber.scrub_string(content, scrubber.EMAIL, '(email removed)')
    content = scrubber.scrub_string(content, scrubber.URL, '(URL removed)')
    return content
Example #4
0
 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 !')
Example #5
0
def scrub_pii(content):
    content = scrubber.scrub_string(content, scrubber.EMAIL, '(email removed)')
    content = scrubber.scrub_string(content, scrubber.URL, '(URL removed)')
    return content
Example #6
0
def scrub_pii(content):
    return scrubber.scrub_string(content, scrubber.EMAIL, '(email removed)')
Example #7
0
 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 !')