added negative amounts to the random test

This commit is contained in:
2020-10-13 02:07:41 +02:00
parent 7fc06939b7
commit 3b2adf1c87

View File

@@ -42,7 +42,7 @@ def random_data():
date = f"{choice(range(2014, 2018))}-{choice(range(1, 13)):02}-{choice(range(1, 29)):02}" date = f"{choice(range(2014, 2018))}-{choice(range(1, 13)):02}-{choice(range(1, 29)):02}"
source = choice(ENTITIES) source = choice(ENTITIES)
target = choice([i for i in ENTITIES if i != source]) target = choice([i for i in ENTITIES if i != source])
amount = Decimal(choice(range(5, 250))) amount = Decimal(choice(range(-500, 250)))
data.append(f"{date},{source},{target},{amount}") data.append(f"{date},{source},{target},{amount}")
return data return data