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