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