コード例 #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 ')
コード例 #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 ')
コード例 #3
0
ファイル: jinja_helpers.py プロジェクト: snorp/socorro
def scrub_pii(content):
    content = scrubber.scrub_string(content, scrubber.EMAIL, '(email removed)')
    content = scrubber.scrub_string(content, scrubber.URL, '(URL removed)')
    return content
コード例 #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 !')
コード例 #5
0
ファイル: jinja_helpers.py プロジェクト: uglide/socorro
def scrub_pii(content):
    content = scrubber.scrub_string(content, scrubber.EMAIL, '(email removed)')
    content = scrubber.scrub_string(content, scrubber.URL, '(URL removed)')
    return content
コード例 #6
0
ファイル: helpers.py プロジェクト: azuwis/socorro
def scrub_pii(content):
    return scrubber.scrub_string(content, scrubber.EMAIL, '(email removed)')
コード例 #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 !')