Improve performance of generating non-cryptographically secure uuids (#41314)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-10-07 16:37:01 +02:00
1 parent 451f27bba1
commit 8d5c124deb
6 files changed
+14 -17

No files matched your search

+4 -4
View File
@@ -5,7 +5,7 @@ import uuid
import homeassistant.util.uuid as uuid_util
async def test_uuid_v1mc_hex():
"""Verify we can generate a uuid_v1mc and return hex."""
assert len(uuid_util.uuid_v1mc_hex()) == 32
assert uuid.UUID(uuid_util.uuid_v1mc_hex())
async def test_uuid_util_random_uuid_hex():
"""Verify we can generate a random uuid."""
assert len(uuid_util.random_uuid_hex()) == 32
assert uuid.UUID(uuid_util.random_uuid_hex())