Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def check_keep_domain(self):
"""convenience method for runnint tests with the keep_domain kwarg"""
before, after = self.get_before_after()
scrubber = scrubadub.scrubbers.Scrubber()
result = scrubber.clean_urls(
before,
replacement="path/to/something",
keep_domain=True,
)
self.check_equal(after, result)
def __init__(self, *args, **kwargs):
super(Scrubber, self).__init__(*args, **kwargs)
# instantiate all of the detectors which, by default, uses all of the
# detectors that are in the detectors.types dictionary
self._detectors = {}
for detector_cls in detectors.iter_detector_clss():
self.add_detector(detector_cls)