Showing
1 changed file
with
10 additions
and
6 deletions
@@ -14,6 +14,10 @@ def create_fake_sentence(): | @@ -14,6 +14,10 @@ def create_fake_sentence(): | ||
14 | return fake.sentence(nb_words=10, variable_nb_words=True) | 14 | return fake.sentence(nb_words=10, variable_nb_words=True) |
15 | 15 | ||
16 | 16 | ||
17 | +def description_with_id(prefix, sentence): | ||
18 | + return "{}-{}: {}".format(prefix, fake.uuid4()[:8], sentence) | ||
19 | + | ||
20 | + | ||
17 | def create_fake_doc(): | 21 | def create_fake_doc(): |
18 | content = fake.text() | 22 | content = fake.text() |
19 | suffix = fake.random_element(('.txt', '.doc', '.docx', '.pdf')) | 23 | suffix = fake.random_element(('.txt', '.doc', '.docx', '.pdf')) |
@@ -98,7 +102,7 @@ def test_tender_data_limited(intervals, procurement_method_type): | @@ -98,7 +102,7 @@ def test_tender_data_limited(intervals, procurement_method_type): | ||
98 | "id": "55523100-3", | 102 | "id": "55523100-3", |
99 | "scheme": "CPV" | 103 | "scheme": "CPV" |
100 | }, | 104 | }, |
101 | - "description": u"Послуги шкільних їдалень", | 105 | + "description": description_with_id('i', u"Послуги шкільних їдалень"), |
102 | "id": "2dc54675d6364e2baffbc0f8e74432ac", | 106 | "id": "2dc54675d6364e2baffbc0f8e74432ac", |
103 | "deliveryDate": { | 107 | "deliveryDate": { |
104 | "endDate": (now + timedelta(days=5)).isoformat() | 108 | "endDate": (now + timedelta(days=5)).isoformat() |
@@ -189,7 +193,7 @@ def test_meat_tender_data(tender): | @@ -189,7 +193,7 @@ def test_meat_tender_data(tender): | ||
189 | "code": "ee3e24bc17234a41bd3e3a04cc28e9c6", | 193 | "code": "ee3e24bc17234a41bd3e3a04cc28e9c6", |
190 | "featureOf": "tenderer", | 194 | "featureOf": "tenderer", |
191 | "title": "Термін оплати", | 195 | "title": "Термін оплати", |
192 | - "description": "Умови відстрочки платежу після поставки товару", | 196 | + "description": description_with_id('f', "Умови відстрочки платежу після поставки товару"), |
193 | "enum": [ | 197 | "enum": [ |
194 | { | 198 | { |
195 | "value": 0.15, | 199 | "value": 0.15, |
@@ -214,7 +218,7 @@ def test_meat_tender_data(tender): | @@ -214,7 +218,7 @@ def test_meat_tender_data(tender): | ||
214 | "featureOf": "item", | 218 | "featureOf": "item", |
215 | "relatedItem": item_id, | 219 | "relatedItem": item_id, |
216 | "title": "Сорт", | 220 | "title": "Сорт", |
217 | - "description": "Сорт продукції", | 221 | + "description": description_with_id('f', "Сорт продукції"), |
218 | "enum": [ | 222 | "enum": [ |
219 | { | 223 | { |
220 | "value": 0.05, | 224 | "value": 0.05, |
@@ -258,7 +262,7 @@ def test_question_data(lot=False): | @@ -258,7 +262,7 @@ def test_question_data(lot=False): | ||
258 | }, | 262 | }, |
259 | "name": fake.company() | 263 | "name": fake.company() |
260 | }, | 264 | }, |
261 | - "description": fake.sentence(nb_words=10, variable_nb_words=True), | 265 | + "description": description_with_id('q', fake.sentence(nb_words=10, variable_nb_words=True)), |
262 | "title": fake.sentence(nb_words=6, variable_nb_words=True) | 266 | "title": fake.sentence(nb_words=6, variable_nb_words=True) |
263 | } | 267 | } |
264 | }) | 268 | }) |
@@ -557,7 +561,7 @@ def test_award_data(): | @@ -557,7 +561,7 @@ def test_award_data(): | ||
557 | def test_item_data(): | 561 | def test_item_data(): |
558 | now = get_now() | 562 | now = get_now() |
559 | return { | 563 | return { |
560 | - "description": fake.catch_phrase(), | 564 | + "description": description_with_id('i', fake.catch_phrase()), |
561 | "deliveryDate": { | 565 | "deliveryDate": { |
562 | "endDate": (now + timedelta(days=5)).isoformat() | 566 | "endDate": (now + timedelta(days=5)).isoformat() |
563 | }, | 567 | }, |
@@ -639,7 +643,7 @@ def test_invalid_features_data(): | @@ -639,7 +643,7 @@ def test_invalid_features_data(): | ||
639 | def test_lot_data(): | 643 | def test_lot_data(): |
640 | return munchify( | 644 | return munchify( |
641 | { | 645 | { |
642 | - "description": fake.sentence(nb_words=10, variable_nb_words=True), | 646 | + "description": description_with_id('l', fake.sentence(nb_words=10, variable_nb_words=True)), |
643 | "title": fake.sentence(nb_words=6, variable_nb_words=True), | 647 | "title": fake.sentence(nb_words=6, variable_nb_words=True), |
644 | "value": { | 648 | "value": { |
645 | "currency": "UAH", | 649 | "currency": "UAH", |
Please
register
or
login
to post a comment