diff --git a/swift/obj/watchers/dark_data.py b/swift/obj/watchers/dark_data.py index 01b3dc8071..0fb3116192 100644 --- a/swift/obj/watchers/dark_data.py +++ b/swift/obj/watchers/dark_data.py @@ -16,7 +16,7 @@ # # This is an audit watcher that manages the dark data in the cluster. # Since the API for audit watchers is intended to use external plugins, -# this code is invoked as if it were external: through pkg_resources. +# this code is invoked as if it were external: through load_pkg_resources(). # Our setup.py comes pre-configured for convenience, but the operator has # to enable this watcher honestly by additing DarkDataWatcher to watchers= # in object-server.conf. The default is off, as if this does not exist. diff --git a/test/unit/obj/test_auditor.py b/test/unit/obj/test_auditor.py index 0c20c65482..f26764e058 100644 --- a/test/unit/obj/test_auditor.py +++ b/test/unit/obj/test_auditor.py @@ -17,7 +17,6 @@ import unittest import json import mock import os -import pkg_resources import signal import string import sys @@ -67,13 +66,6 @@ def works_only_once(callable_thing, exception): return only_once -def no_audit_watchers(group, name=None): - if group == 'swift.object_audit_watcher': - return iter([]) - else: - return pkg_resources.iter_entry_points(group, name) - - class FakeRing1(object): def __init__(self, swift_dir, ring_name=None): @@ -1595,7 +1587,6 @@ class TestAuditor(TestAuditorBase): .format(outstanding_pids)) -@mock.patch('pkg_resources.iter_entry_points', no_audit_watchers) @patch_policies(_mocked_policies) class TestAuditWatchers(TestAuditorBase):