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,6 +163,8 @@ def test_feature_data(): | ||
163 | return munchify({ | 163 | return munchify({ |
164 | "code": uuid4().hex, | 164 | "code": uuid4().hex, |
165 | "title": field_with_id("f", fake.title()), | 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 | "description": fake.description(), | 168 | "description": fake.description(), |
167 | "enum": [ | 169 | "enum": [ |
168 | { | 170 | { |
@@ -186,7 +188,9 @@ def test_question_data(): | @@ -186,7 +188,9 @@ def test_question_data(): | ||
186 | "data": { | 188 | "data": { |
187 | "author": fake.procuringEntity(), | 189 | "author": fake.procuringEntity(), |
188 | "description": fake.description(), | 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,6 +301,8 @@ def test_supplier_data(): | ||
297 | def test_item_data(cpv=None): | 301 | def test_item_data(cpv=None): |
298 | data = fake.fake_item(cpv) | 302 | data = fake.fake_item(cpv) |
299 | data["description"] = field_with_id("i", data["description"]) | 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 | days = fake.random_int(min=1, max=30) | 306 | days = fake.random_int(min=1, max=30) |
301 | data["deliveryDate"] = {"endDate": (get_now() + timedelta(days=days)).isoformat()} | 307 | data["deliveryDate"] = {"endDate": (get_now() + timedelta(days=days)).isoformat()} |
302 | data["deliveryAddress"]["countryName_en"] = translate_country_en(data["deliveryAddress"]["countryName"]) | 308 | data["deliveryAddress"]["countryName_en"] = translate_country_en(data["deliveryAddress"]["countryName"]) |
@@ -331,6 +337,8 @@ def test_lot_data(max_value_amount): | @@ -331,6 +337,8 @@ def test_lot_data(max_value_amount): | ||
331 | { | 337 | { |
332 | "description": fake.description(), | 338 | "description": fake.description(), |
333 | "title": field_with_id('l', fake.title()), | 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 | "value": { | 342 | "value": { |
335 | "currency": "UAH", | 343 | "currency": "UAH", |
336 | "amount": value_amount, | 344 | "amount": value_amount, |
Please
register
or
login
to post a comment