Improve performance of generating non-cryptographically secure uuids (#41314)
This commit is contained in:
1 parent
451f27bba1
commit
8d5c124deb
6 files changed
+14
-17
No files matched your search
@@ -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())
|
||||
Reference in new issue
Block a user