Showing
2 changed files
with
4 additions
and
97 deletions
| ... | ... | @@ -118,100 +118,6 @@ def test_tender_data(period_interval): |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | |
| 121 | -def prom_test_tender_data(): | |
| 122 | - now = get_now() | |
| 123 | - return { | |
| 124 | - "title": fake.catch_phrase(), | |
| 125 | - "mode": "test", | |
| 126 | - "submissionMethodDetails": "quick", | |
| 127 | - "description": u"Тестовий тендер", # Error @prom when "Тестовый тендер" | |
| 128 | - "description_ru": u"Тестовый тендер", | |
| 129 | - "description_en": "Test tender", | |
| 130 | - "procuringEntity": { | |
| 131 | - "name": fake.company(), | |
| 132 | - "name_ru": fake_ru.company(), | |
| 133 | - "name_en": fake_en.company(), | |
| 134 | - "identifier": { | |
| 135 | - "scheme": u"UA-EDR", | |
| 136 | - "id": u"0000{}".format(fake.pyint()), | |
| 137 | - "uri": fake.image_url(width=None, height=None) | |
| 138 | - }, | |
| 139 | - "address": { | |
| 140 | - "countryName": u"Україна", | |
| 141 | - "countryName_ru": u"Украина", | |
| 142 | - "countryName_en": "Ukraine", | |
| 143 | - "postalCode": fake.postalcode(), | |
| 144 | - "region": u"м. Київ", | |
| 145 | - "locality": u"м. Київ", | |
| 146 | - "streetAddress": fake.street_address() | |
| 147 | - }, | |
| 148 | - "contactPoint": { | |
| 149 | - "name": fake.name(), | |
| 150 | - "telephone": fake.phone_number() | |
| 151 | - } | |
| 152 | - }, | |
| 153 | - "value": { | |
| 154 | - "amount": 50000, # Error @prom when float '50000.99' | |
| 155 | - "currency": u"UAH" | |
| 156 | - }, | |
| 157 | - "minimalStep": { | |
| 158 | - "amount": 100, # Error @prom when float '100.1' | |
| 159 | - "currency": u"UAH" | |
| 160 | - }, | |
| 161 | - "items": [ | |
| 162 | - { | |
| 163 | - "description": fake.catch_phrase(), | |
| 164 | - "deliveryDate": { | |
| 165 | - "startDate": (now + timedelta(days=4)).isoformat(), | |
| 166 | - "endDate": (now + timedelta(days=5)).isoformat() | |
| 167 | - }, | |
| 168 | - "deliveryLocation": { | |
| 169 | - "latitude": "49.8500° N", | |
| 170 | - "longitude": "24.0167° E" | |
| 171 | - }, | |
| 172 | - "deliveryAddress": { | |
| 173 | - "countryName": u"Україна", | |
| 174 | - "countryName_ru": u"Украина", | |
| 175 | - "countryName_en": "Ukraine", | |
| 176 | - "postalCode": fake.postalcode(), | |
| 177 | - "region": u"м. Київ", | |
| 178 | - "locality": u"м. Київ", | |
| 179 | - "streetAddress": fake.street_address() | |
| 180 | - }, | |
| 181 | - "classification": { | |
| 182 | - "scheme": u"CPV", | |
| 183 | - "id": u"44617100-9", | |
| 184 | - "description": u"Картонки", | |
| 185 | - "description_ru": u"Большие картонные коробки", | |
| 186 | - "description_en": u"Cartons" | |
| 187 | - }, | |
| 188 | - "additionalClassifications": [ | |
| 189 | - { | |
| 190 | - "scheme": u"ДКПП", | |
| 191 | - "id": u"17.21.1", | |
| 192 | - "description": u"Папір і картон гофровані, паперова й картонна тара" | |
| 193 | - } | |
| 194 | - ], | |
| 195 | - "unit": { | |
| 196 | - "name": u"кілограм", | |
| 197 | - "name_ru": u"килограмм", | |
| 198 | - "name_en": "kilogram", | |
| 199 | - "code": u"KGM" | |
| 200 | - }, | |
| 201 | - "quantity": fake.pyint() | |
| 202 | - } | |
| 203 | - ], | |
| 204 | - "enquiryPeriod": { | |
| 205 | - "startDate": (now + timedelta(days=1)).isoformat(), | |
| 206 | - "endDate": (now + timedelta(days=2)).isoformat() | |
| 207 | - }, | |
| 208 | - "tenderPeriod": { | |
| 209 | - "startDate": (now + timedelta(days=3)).isoformat(), | |
| 210 | - "endDate": (now + timedelta(days=5)).isoformat() | |
| 211 | - } | |
| 212 | - } | |
| 213 | - | |
| 214 | - | |
| 215 | 121 | def test_tender_data_multiple_lots(period_interval): |
| 216 | 122 | now = get_now() |
| 217 | 123 | t_data = test_tender_data(period_interval) | ... | ... |
| ... | ... | @@ -13,7 +13,7 @@ from robot.libraries.BuiltIn import BuiltIn |
| 13 | 13 | from robot.output import LOGGER |
| 14 | 14 | from robot.output.loggerhelper import Message |
| 15 | 15 | from .initial_data import ( |
| 16 | - auction_bid, create_fake_doc, prom_test_tender_data, | |
| 16 | + auction_bid, create_fake_doc, | |
| 17 | 17 | test_award_data, test_bid_data, test_complaint_data, |
| 18 | 18 | test_complaint_reply_data, test_question_answer_data, |
| 19 | 19 | test_question_data, test_tender_data, test_tender_data_multiple_lots |
| ... | ... | @@ -48,8 +48,9 @@ def change_state(arguments): |
| 48 | 48 | return "pass" |
| 49 | 49 | |
| 50 | 50 | |
| 51 | -def prepare_prom_test_tender_data(): | |
| 52 | - return munchify({'data': prom_test_tender_data()}) | |
| 51 | +def prepare_prom_test_tender_data(period_interval, mode): | |
| 52 | + t_data = prepare_test_tender_data(period_interval, mode) | |
| 53 | + return munchify({'data': t_data}) | |
| 53 | 54 | |
| 54 | 55 | |
| 55 | 56 | def compare_date(data1, data2): | ... | ... |
Please
register
or
login
to post a comment