Merge "tests: Fix cross-test interaction"

This commit is contained in:
Zuul 2022-06-21 22:04:52 +00:00 committed by Gerrit Code Review
commit be87b29a72

View File

@ -5526,6 +5526,8 @@ class TestStatsdLogging(unittest.TestCase):
conf = {'log_statsd_host': 'another.host.com'}
with warnings.catch_warnings(record=True) as cm:
if six.PY2:
getattr(utils, '__warningregistry__', {}).clear()
warnings.resetwarnings()
warnings.simplefilter('always', DeprecationWarning)
logger = utils.get_logger(