Commit 8b821d911234067d9cb9fae1a83f8e2efba57373
Merge pull request #149 from mykhaly/fix_minimal_step
Fix minimalStep.amount
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", |
... | ... | @@ -61,12 +63,12 @@ def test_tender_data(intervals, periods=("enquiry", "tender")): |
61 | 63 | "kind": "other" |
62 | 64 | }, |
63 | 65 | "value": { |
64 | - "amount": 50000.99, | |
66 | + "amount": value_amount, | |
65 | 67 | "currency": u"UAH", |
66 | 68 | "valueAddedTaxIncluded": True |
67 | 69 | }, |
68 | 70 | "minimalStep": { |
69 | - "amount": 100.1, | |
71 | + "amount": round(random.uniform(0.005, 0.03) * value_amount, 2), | |
70 | 72 | "currency": u"UAH" |
71 | 73 | }, |
72 | 74 | "items": [] | ... | ... |
Please
register
or
login
to post a comment