Skip to content

Commit d74a0f0

Browse files
committed
autogenerated date for test
1 parent 202f0a3 commit d74a0f0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

backend/tests/utils/values_for_tests.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
from dataclasses import dataclass
44
from decimal import Decimal
5+
from datetime import datetime, timedelta
6+
import random
7+
58

69
# Lists of data types for 'invalid data type' testing
710
integers = [-1, 0, 1]
@@ -292,9 +295,8 @@ class InvalidValues:
292295
]
293296

294297
for_future_dates = [
295-
"2100-01-01", # Year in future
296-
"2050-12-31", # Year in future
297-
"2029-06-15", # Year in future
298+
(datetime.now() + timedelta(days=random.randint(1, 30))).strftime("%Y-%m-%d")
299+
for i in range(3)
298300
]
299301

300302
# Strings which are not in acceptable date time format

0 commit comments

Comments
 (0)