From: Douglas Bagnall Date: Wed, 28 Feb 2024 03:19:38 +0000 (+1300) Subject: pytest:auth_log_base: use string_is_guid() X-Git-Tag: tdb-1.4.11~1658 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d087d1d29e7d64f1efa8fcf8cfb542665aa122f;p=thirdparty%2Fsamba.git pytest:auth_log_base: use string_is_guid() Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/auth_log_base.py b/python/samba/tests/auth_log_base.py index 131f019de43..5c5c878c823 100644 --- a/python/samba/tests/auth_log_base.py +++ b/python/samba/tests/auth_log_base.py @@ -22,10 +22,10 @@ import samba.tests from samba.messaging import Messaging from samba.dcerpc.messaging import MSG_AUTH_LOG, AUTH_EVENT_NAME from samba.param import LoadParm +from samba import string_is_guid import time import json import os -import re def default_msg_filter(msg): @@ -211,11 +211,6 @@ class AuthLogTestBase(samba.tests.TestCase): return list(filter(is_not_netlogon, messages)) - GUID_RE = re.compile( - "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}") - - # - # Is the supplied GUID string correctly formatted - # def is_guid(self, guid): - return self.GUID_RE.fullmatch(guid) + """Is the supplied GUID string correctly formatted""" + return string_is_guid(guid)