Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_customize_filth_identification(self):
"""
BEFORE: contact Joe Duffy at joe@example.com
AFTER: contact <b>NAME</b> <b>NAME</b> at <b>EMAIL</b>
"""
before, after = self.get_before_after()
import scrubadub
prefix = scrubadub.filth.base.Filth.prefix
suffix = scrubadub.filth.base.Filth.suffix
scrubadub.filth.base.Filth.prefix = u'<b>'
scrubadub.filth.base.Filth.suffix = u'</b>'
scrubber = scrubadub.Scrubber()
self.check_equal(after, scrubber.clean(before))
scrubadub.filth.base.Filth.prefix = prefix
scrubadub.filth.base.Filth.suffix = suffix
def test_customize_filth_identification(self):
"""
BEFORE: contact Joe Duffy at joe@example.com
AFTER: contact <b>NAME</b> <b>NAME</b> at <b>EMAIL</b>
"""
before, after = self.get_before_after()
import scrubadub
prefix = scrubadub.filth.base.Filth.prefix
suffix = scrubadub.filth.base.Filth.suffix
scrubadub.filth.base.Filth.prefix = u'<b>'
scrubadub.filth.base.Filth.suffix = u'</b>'
scrubber = scrubadub.Scrubber()
self.check_equal(after, scrubber.clean(before))
scrubadub.filth.base.Filth.prefix = prefix
scrubadub.filth.base.Filth.suffix = suffix
def test_customize_filth_identification(self):
"""
BEFORE: contact Joe Duffy at joe@example.com
AFTER: contact <b>NAME</b> <b>NAME</b> at <b>EMAIL</b>
"""
before, after = self.get_before_after()
import scrubadub
prefix = scrubadub.filth.base.Filth.prefix
suffix = scrubadub.filth.base.Filth.suffix
scrubadub.filth.base.Filth.prefix = u'<b>'
scrubadub.filth.base.Filth.suffix = u'</b>'
scrubber = scrubadub.Scrubber()
self.check_equal(after, scrubber.clean(before))
scrubadub.filth.base.Filth.prefix = prefix
scrubadub.filth.base.Filth.suffix = suffix