1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

pytest:auth_log_base: use string_is_guid()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2024-02-28 16:19:38 +13:00 committed by Andrew Bartlett
parent 0fe263a56d
commit 6d087d1d29

View File

@ -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)