Commit 9d1ef3788c91a76ef251b114d8373e2a35171629
1 parent
9ef33508
Make minimalStep.amount random value with limits in test_tender_data
Showing
1 changed file
with
4 additions
and
2 deletions
... | ... | @@ -4,6 +4,7 @@ from faker import Factory |
4 | 4 | from munch import munchify |
5 | 5 | from tempfile import NamedTemporaryFile |
6 | 6 | from .local_time import get_now |
7 | +import random | |
7 | 8 | |
8 | 9 | fake = Factory.create('uk_UA') |
9 | 10 | fake_ru = Factory.create('ru') |
... | ... | @@ -29,6 +30,7 @@ def create_fake_doc(): |
29 | 30 | |
30 | 31 | def test_tender_data(intervals, periods=("enquiry", "tender")): |
31 | 32 | now = get_now() |
33 | + value_amount = 50000.99 | |
32 | 34 | t_data = { |
33 | 35 | "title": u"[ТЕСТУВАННЯ] " + fake.catch_phrase(), |
34 | 36 | "mode": "test", |
... | ... | @@ -60,12 +62,12 @@ def test_tender_data(intervals, periods=("enquiry", "tender")): |
60 | 62 | } |
61 | 63 | }, |
62 | 64 | "value": { |
63 | - "amount": 50000.99, | |
65 | + "amount": value_amount, | |
64 | 66 | "currency": u"UAH", |
65 | 67 | "valueAddedTaxIncluded": True |
66 | 68 | }, |
67 | 69 | "minimalStep": { |
68 | - "amount": 100.1, | |
70 | + "amount": round(random.uniform(0.005, 0.03) * value_amount, 2), | |
69 | 71 | "currency": u"UAH" |
70 | 72 | }, |
71 | 73 | "items": [] | ... | ... |
Please
register
or
login
to post a comment