diff options
author | Swen Wenzel <5111028+swenzel@users.noreply.github.com> | 2019-12-30 00:12:30 +0100 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2019-12-29 15:12:30 -0800 |
commit | ee1c4a42ef3c7f0aa7c98f0c48b6ab0ae76d77da (patch) | |
tree | e536d4854bf88b0d24b7b2a2f5ee3d731eda9716 /test/testutil.py | |
parent | 31f846c782b9dc6f2107340d269a7558e99bdfe2 (diff) | |
download | kafka-python-ee1c4a42ef3c7f0aa7c98f0c48b6ab0ae76d77da.tar.gz |
Enable SCRAM-SHA-256 and SCRAM-SHA-512 for sasl (#1918)
Diffstat (limited to 'test/testutil.py')
-rw-r--r-- | test/testutil.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/testutil.py b/test/testutil.py index 77a6673..ec4d70b 100644 --- a/test/testutil.py +++ b/test/testutil.py @@ -2,10 +2,15 @@ from __future__ import absolute_import import os import random +import re import string import time +def special_to_underscore(string, _matcher=re.compile(r'[^a-zA-Z0-9_]+')): + return _matcher.sub('_', string) + + def random_string(length): return "".join(random.choice(string.ascii_letters) for i in range(length)) |