File tree Expand file tree Collapse file tree
manage_breast_screening/notifications/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import secrets
21import uuid
32from datetime import datetime , timedelta
43
@@ -70,7 +69,7 @@ class Meta:
7069 message = SubFactory (MessageFactory )
7170 status = "read"
7271 status_updated_at = datetime .now () - timedelta (minutes = 10 )
73- idempotency_key = Sequence (lambda n : f"{ secrets . token_hex ( 18 ) } %09d " % n )
72+ idempotency_key = Sequence (lambda n : f"{ uuid . uuid4 (). hex } %03d " % n )
7473
7574
7675class MessageStatusFactory (DjangoModelFactory ):
@@ -81,4 +80,4 @@ class Meta:
8180 message = SubFactory (MessageFactory )
8281 status = "delivered"
8382 status_updated_at = datetime .now () - timedelta (minutes = 10 )
84- idempotency_key = Sequence (lambda n : f"{ secrets . token_hex ( 18 ) } %09d " % n )
83+ idempotency_key = Sequence (lambda n : f"{ uuid . uuid4 (). hex } %03d " % n )
You can’t perform that action at this time.
0 commit comments