moto/tests/helpers.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
230 B
Python
Raw Normal View History

from uuid import UUID
from sure import assertion
2013-07-27 20:24:38 +00:00
@assertion
def match_uuid4(context):
try:
uuid_obj = UUID(context.obj, version=4)
except ValueError:
return False
return str(uuid_obj) == context.obj