Commit 4cd4ccc47378946fcbfeafc91c47e15dd0124de1
1 parent
c50b81c3
Add ids to en and ru fields in initial data
Showing
1 changed file
with
9 additions
and
1 deletions
| ... | ... | @@ -163,6 +163,8 @@ def test_feature_data(): |
| 163 | 163 | return munchify({ |
| 164 | 164 | "code": uuid4().hex, |
| 165 | 165 | "title": field_with_id("f", fake.title()), |
| 166 | + "title_en": field_with_id('f', fake_en.sentence(nb_words=5, variable_nb_words=True)), | |
| 167 | + "title_ru": field_with_id('f', fake_ru.sentence(nb_words=5, variable_nb_words=True)), | |
| 166 | 168 | "description": fake.description(), |
| 167 | 169 | "enum": [ |
| 168 | 170 | { |
| ... | ... | @@ -186,7 +188,9 @@ def test_question_data(): |
| 186 | 188 | "data": { |
| 187 | 189 | "author": fake.procuringEntity(), |
| 188 | 190 | "description": fake.description(), |
| 189 | - "title": field_with_id("q", fake.title()) | |
| 191 | + "title": field_with_id("q", fake.title()), | |
| 192 | + "title_en": field_with_id('q', fake_en.sentence(nb_words=5, variable_nb_words=True)), | |
| 193 | + "title_ru": field_with_id('q', fake_ru.sentence(nb_words=5, variable_nb_words=True)) | |
| 190 | 194 | } |
| 191 | 195 | }) |
| 192 | 196 | |
| ... | ... | @@ -297,6 +301,8 @@ def test_supplier_data(): |
| 297 | 301 | def test_item_data(cpv=None): |
| 298 | 302 | data = fake.fake_item(cpv) |
| 299 | 303 | data["description"] = field_with_id("i", data["description"]) |
| 304 | + data["description_en"] = field_with_id("i", data["description_en"]) | |
| 305 | + data["description_ru"] = field_with_id("i", data["description_ru"]) | |
| 300 | 306 | days = fake.random_int(min=1, max=30) |
| 301 | 307 | data["deliveryDate"] = {"endDate": (get_now() + timedelta(days=days)).isoformat()} |
| 302 | 308 | data["deliveryAddress"]["countryName_en"] = translate_country_en(data["deliveryAddress"]["countryName"]) |
| ... | ... | @@ -331,6 +337,8 @@ def test_lot_data(max_value_amount): |
| 331 | 337 | { |
| 332 | 338 | "description": fake.description(), |
| 333 | 339 | "title": field_with_id('l', fake.title()), |
| 340 | + "title_en": field_with_id('l', fake_en.sentence(nb_words=5, variable_nb_words=True)), | |
| 341 | + "title_ru": field_with_id('l', fake_ru.sentence(nb_words=5, variable_nb_words=True)), | |
| 334 | 342 | "value": { |
| 335 | 343 | "currency": "UAH", |
| 336 | 344 | "amount": value_amount, | ... | ... |
Please
register
or
login
to post a comment