Showing
1 changed file
with
333 additions
and
324 deletions
... | ... | @@ -12,6 +12,7 @@ fake_en = Factory.create() |
12 | 12 | |
13 | 13 | TZ = timezone(os.environ['TZ'] if 'TZ' in os.environ else 'Europe/Kiev') |
14 | 14 | |
15 | + | |
15 | 16 | def get_now(): |
16 | 17 | return datetime.now(TZ) |
17 | 18 | |
... | ... | @@ -23,360 +24,364 @@ def create_fake_doc(): |
23 | 24 | tf.close() |
24 | 25 | return tf.name |
25 | 26 | |
27 | + | |
26 | 28 | def test_tender_data(period_interval): |
27 | - now = get_now() | |
28 | - return { | |
29 | - "title": u"[ТЕСТУВАННЯ] " + fake.catch_phrase(), | |
30 | - "mode": "test", | |
31 | - "submissionMethodDetails": "quick", | |
32 | - "description": "Test tender1", #Error @prom when 'Тестовый тендер' | |
33 | - "description_en": "Test tender", | |
34 | - "description_ru": "Тестовый тендер", | |
35 | - "procuringEntity": { | |
36 | - "name": fake.company(), | |
37 | - "name_ru": fake_ru.company(), | |
38 | - "name_en": fake_en.company(), | |
39 | - "identifier": { | |
40 | - "scheme": u"UA-EDR", | |
41 | - "id": u"0000{}".format(fake.pyint()), | |
42 | - "uri": fake.image_url(width=None, height=None) | |
43 | - }, | |
44 | - "address": { | |
45 | - "countryName": u"Україна", | |
46 | - "postalCode": fake.postalcode(), | |
47 | - "region": u"м. Київ", | |
48 | - "locality": u"м. Київ", | |
49 | - "streetAddress": fake.street_address() | |
50 | - }, | |
51 | - "contactPoint": { | |
52 | - "name": fake.name(), | |
53 | - "telephone": fake.phone_number() | |
54 | - } | |
55 | - }, | |
56 | - "value": { | |
57 | - "amount": 50000, #Error @prom when float '50000.99' | |
58 | - "currency": u"UAH" | |
59 | - }, | |
60 | - "minimalStep": { | |
61 | - "amount": 100, #Error @prom when float '100.1' | |
62 | - "currency": u"UAH" | |
63 | - }, | |
64 | - "items": [ | |
65 | - { | |
66 | - "description": fake.catch_phrase(), | |
67 | - "deliveryDate": { | |
68 | - "endDate": (now + timedelta(days=5)).isoformat() | |
69 | - }, | |
70 | - "deliveryLocation": { | |
71 | - "latitude": u"49.8500° N", | |
72 | - "longitude": u"24.0167° E" | |
73 | - }, | |
74 | - "deliveryAddress": { | |
29 | + now = get_now() | |
30 | + return { | |
31 | + "title": u"[ТЕСТУВАННЯ] " + fake.catch_phrase(), | |
32 | + "mode": "test", | |
33 | + "submissionMethodDetails": "quick", | |
34 | + "description": "Test tender1", # Error @prom when 'Тестовый тендер' | |
35 | + "description_en": "Test tender", | |
36 | + "description_ru": "Тестовый тендер", | |
37 | + "procuringEntity": { | |
38 | + "name": fake.company(), | |
39 | + "name_ru": fake_ru.company(), | |
40 | + "name_en": fake_en.company(), | |
41 | + "identifier": { | |
42 | + "scheme": u"UA-EDR", | |
43 | + "id": u"0000{}".format(fake.pyint()), | |
44 | + "uri": fake.image_url(width=None, height=None) | |
45 | + }, | |
46 | + "address": { | |
75 | 47 | "countryName": u"Україна", |
76 | 48 | "postalCode": fake.postalcode(), |
77 | 49 | "region": u"м. Київ", |
78 | 50 | "locality": u"м. Київ", |
79 | 51 | "streetAddress": fake.street_address() |
80 | 52 | }, |
81 | - "classification": { | |
82 | - "scheme": u"CPV", | |
83 | - "id": u"44617100-9", | |
84 | - "description": u"Cartons" | |
85 | - }, | |
86 | - "additionalClassifications": [ | |
87 | - { | |
88 | - "scheme": u"ДКПП", | |
89 | - "id": u"17.21.1", | |
90 | - "description": u"папір і картон гофровані, паперова й картонна тара" | |
91 | - } | |
92 | - ], | |
93 | - "unit": { | |
94 | - "name": u"кілограм", | |
95 | - "code": u"KGM" | |
96 | - }, | |
97 | - "quantity": fake.pyint() | |
53 | + "contactPoint": { | |
54 | + "name": fake.name(), | |
55 | + "telephone": fake.phone_number() | |
56 | + } | |
57 | + }, | |
58 | + "value": { | |
59 | + "amount": 50000, # Error @prom when float '50000.99' | |
60 | + "currency": u"UAH" | |
61 | + }, | |
62 | + "minimalStep": { | |
63 | + "amount": 100, # Error @prom when float '100.1' | |
64 | + "currency": u"UAH" | |
65 | + }, | |
66 | + "items": [ | |
67 | + { | |
68 | + "description": fake.catch_phrase(), | |
69 | + "deliveryDate": { | |
70 | + "endDate": (now + timedelta(days=5)).isoformat() | |
71 | + }, | |
72 | + "deliveryLocation": { | |
73 | + "latitude": u"49.8500° N", | |
74 | + "longitude": u"24.0167° E" | |
75 | + }, | |
76 | + "deliveryAddress": { | |
77 | + "countryName": u"Україна", | |
78 | + "postalCode": fake.postalcode(), | |
79 | + "region": u"м. Київ", | |
80 | + "locality": u"м. Київ", | |
81 | + "streetAddress": fake.street_address() | |
82 | + }, | |
83 | + "classification": { | |
84 | + "scheme": u"CPV", | |
85 | + "id": u"44617100-9", | |
86 | + "description": u"Cartons" | |
87 | + }, | |
88 | + "additionalClassifications": [ | |
89 | + { | |
90 | + "scheme": u"ДКПП", | |
91 | + "id": u"17.21.1", | |
92 | + "description": u"папір і картон гофровані, паперова й картонна тара" | |
93 | + } | |
94 | + ], | |
95 | + "unit": { | |
96 | + "name": u"кілограм", | |
97 | + "code": u"KGM" | |
98 | + }, | |
99 | + "quantity": fake.pyint() | |
100 | + } | |
101 | + ], | |
102 | + "enquiryPeriod": { | |
103 | + "startDate": (now).isoformat(), | |
104 | + "endDate": (now + timedelta(minutes=1)).isoformat() | |
105 | + }, | |
106 | + "tenderPeriod": { | |
107 | + "startDate": (now + timedelta(minutes=2)).isoformat(), | |
108 | + "endDate": (now + timedelta(minutes=(2 + period_interval))).isoformat() | |
98 | 109 | } |
99 | - ], | |
100 | - "enquiryPeriod": { | |
101 | - "startDate": (now).isoformat(), | |
102 | - "endDate": (now + timedelta(minutes=1)).isoformat() | |
103 | - }, | |
104 | - "tenderPeriod": { | |
105 | - "startDate": (now + timedelta(minutes=2)).isoformat(), | |
106 | - "endDate": (now + timedelta(minutes=(2+period_interval))).isoformat() | |
107 | 110 | } |
108 | -} | |
111 | + | |
109 | 112 | |
110 | 113 | def prom_test_tender_data(): |
111 | - now = get_now() | |
112 | - return { | |
113 | - "title": fake.catch_phrase(), | |
114 | - "mode": "test", | |
115 | - "submissionMethodDetails": "quick", | |
116 | - "description": "Test tender1", #Error @prom when 'Тестовый тендер' | |
117 | - "description_en": "Test tender", | |
118 | - "description_ru": "Тестовый тендер", | |
119 | - "procuringEntity": { | |
120 | - "name": fake.company(), | |
121 | - "name_ru": fake_ru.company(), | |
122 | - "name_en": fake_en.company(), | |
123 | - "identifier": { | |
124 | - "scheme": u"UA-EDR", | |
125 | - "id": u"0000{}".format(fake.pyint()), | |
126 | - "uri": fake.image_url(width=None, height=None) | |
127 | - }, | |
128 | - "address": { | |
129 | - "countryName": u"Україна", | |
130 | - "postalCode": fake.postalcode(), | |
131 | - "region": u"м. Київ", | |
132 | - "locality": u"м. Київ", | |
133 | - "streetAddress": fake.street_address() | |
134 | - }, | |
135 | - "contactPoint": { | |
136 | - "name": fake.name(), | |
137 | - "telephone": fake.phone_number() | |
138 | - } | |
139 | - }, | |
140 | - "value": { | |
141 | - "amount": 50000, #Error @prom when float '50000.99' | |
142 | - "currency": u"UAH" | |
143 | - }, | |
144 | - "minimalStep": { | |
145 | - "amount": 100, #Error @prom when float '100.1' | |
146 | - "currency": u"UAH" | |
147 | - }, | |
148 | - "items": [ | |
149 | - { | |
150 | - "description": fake.catch_phrase(), | |
151 | - "deliveryDate": { | |
152 | - "startDate": (now + timedelta(days=4)).isoformat(), | |
153 | - "endDate": (now + timedelta(days=5)).isoformat() | |
154 | - }, | |
155 | - "deliveryLocation": { | |
156 | - "latitude": "49.8500° N", | |
157 | - "longitude": "24.0167° E" | |
158 | - }, | |
159 | - "deliveryAddress": { | |
114 | + now = get_now() | |
115 | + return { | |
116 | + "title": fake.catch_phrase(), | |
117 | + "mode": "test", | |
118 | + "submissionMethodDetails": "quick", | |
119 | + "description": "Test tender1", # Error @prom when 'Тестовый тендер' | |
120 | + "description_en": "Test tender", | |
121 | + "description_ru": "Тестовый тендер", | |
122 | + "procuringEntity": { | |
123 | + "name": fake.company(), | |
124 | + "name_ru": fake_ru.company(), | |
125 | + "name_en": fake_en.company(), | |
126 | + "identifier": { | |
127 | + "scheme": u"UA-EDR", | |
128 | + "id": u"0000{}".format(fake.pyint()), | |
129 | + "uri": fake.image_url(width=None, height=None) | |
130 | + }, | |
131 | + "address": { | |
160 | 132 | "countryName": u"Україна", |
161 | 133 | "postalCode": fake.postalcode(), |
162 | 134 | "region": u"м. Київ", |
163 | 135 | "locality": u"м. Київ", |
164 | 136 | "streetAddress": fake.street_address() |
165 | 137 | }, |
166 | - "classification": { | |
167 | - "scheme": u"CPV", | |
168 | - "id": u"44617100-9", | |
169 | - "description": u"Cartons" | |
170 | - }, | |
171 | - "additionalClassifications": [ | |
172 | - { | |
173 | - "scheme": u"ДКПП", | |
174 | - "id": u"17.21.1", | |
175 | - "description": u"папір і картон гофровані, паперова й картонна тара" | |
176 | - } | |
177 | - ], | |
178 | - "unit": { | |
179 | - "name": u"кілограм", | |
180 | - "code": u"KGM" | |
181 | - }, | |
182 | - "quantity": fake.pyint() | |
138 | + "contactPoint": { | |
139 | + "name": fake.name(), | |
140 | + "telephone": fake.phone_number() | |
141 | + } | |
142 | + }, | |
143 | + "value": { | |
144 | + "amount": 50000, # Error @prom when float '50000.99' | |
145 | + "currency": u"UAH" | |
146 | + }, | |
147 | + "minimalStep": { | |
148 | + "amount": 100, # Error @prom when float '100.1' | |
149 | + "currency": u"UAH" | |
150 | + }, | |
151 | + "items": [ | |
152 | + { | |
153 | + "description": fake.catch_phrase(), | |
154 | + "deliveryDate": { | |
155 | + "startDate": (now + timedelta(days=4)).isoformat(), | |
156 | + "endDate": (now + timedelta(days=5)).isoformat() | |
157 | + }, | |
158 | + "deliveryLocation": { | |
159 | + "latitude": "49.8500° N", | |
160 | + "longitude": "24.0167° E" | |
161 | + }, | |
162 | + "deliveryAddress": { | |
163 | + "countryName": u"Україна", | |
164 | + "postalCode": fake.postalcode(), | |
165 | + "region": u"м. Київ", | |
166 | + "locality": u"м. Київ", | |
167 | + "streetAddress": fake.street_address() | |
168 | + }, | |
169 | + "classification": { | |
170 | + "scheme": u"CPV", | |
171 | + "id": u"44617100-9", | |
172 | + "description": u"Cartons" | |
173 | + }, | |
174 | + "additionalClassifications": [ | |
175 | + { | |
176 | + "scheme": u"ДКПП", | |
177 | + "id": u"17.21.1", | |
178 | + "description": u"папір і картон гофровані, паперова й картонна тара" | |
179 | + } | |
180 | + ], | |
181 | + "unit": { | |
182 | + "name": u"кілограм", | |
183 | + "code": u"KGM" | |
184 | + }, | |
185 | + "quantity": fake.pyint() | |
186 | + } | |
187 | + ], | |
188 | + "enquiryPeriod": { | |
189 | + "startDate": (now + timedelta(days=1)).isoformat(), | |
190 | + "endDate": (now + timedelta(days=2)).isoformat() | |
191 | + }, | |
192 | + "tenderPeriod": { | |
193 | + "startDate": (now + timedelta(days=3)).isoformat(), | |
194 | + "endDate": (now + timedelta(days=5)).isoformat() | |
183 | 195 | } |
184 | - ], | |
185 | - "enquiryPeriod": { | |
186 | - "startDate": (now + timedelta(days=1)).isoformat(), | |
187 | - "endDate": (now + timedelta(days=2)).isoformat() | |
188 | - }, | |
189 | - "tenderPeriod": { | |
190 | - "startDate": (now + timedelta(days=3)).isoformat(), | |
191 | - "endDate": (now + timedelta(days=5)).isoformat() | |
192 | 196 | } |
193 | -} | |
197 | + | |
194 | 198 | |
195 | 199 | def test_tender_data_multiple_lots(period_interval): |
196 | 200 | now = get_now() |
197 | 201 | return { |
198 | - "title": fake.catch_phrase(), | |
199 | - "mode": "test", | |
200 | - "submissionMethodDetails": "quick", | |
201 | - "description": u"Тестовий тендер", | |
202 | - "description_en": "Test tender", | |
203 | - "description_ru": "Тестовый тендер", | |
204 | - "procuringEntity": { | |
205 | - "name": fake.company(), | |
206 | - "name_ru": fake_ru.company(), | |
207 | - "name_en": fake_en.company(), | |
208 | - "identifier": { | |
209 | - "scheme": u"UA-EDR", | |
210 | - "id": u"0000{}".format(fake.pyint()), | |
211 | - "uri": fake.image_url(width=None, height=None) | |
212 | - }, | |
213 | - "address": { | |
214 | - "countryName": u"Україна", | |
215 | - "postalCode": fake.postalcode(), | |
216 | - "region": u"м. Київ", | |
217 | - "locality": u"м. Київ", | |
218 | - "streetAddress": fake.street_address() | |
219 | - }, | |
220 | - "contactPoint": { | |
221 | - "name": fake.name(), | |
222 | - "telephone": fake.phone_number() | |
223 | - } | |
224 | - }, | |
225 | - "value": { | |
226 | - "amount": 50000.99, | |
227 | - "currency": u"UAH" | |
228 | - }, | |
229 | - "minimalStep": { | |
230 | - "amount": 100.1, | |
231 | - "currency": u"UAH" | |
232 | - }, | |
233 | - "items": [ | |
234 | - { | |
235 | - "description": fake.catch_phrase(), | |
236 | - "deliveryDate": { | |
237 | - "endDate": (now + timedelta(days=5)).isoformat() | |
238 | - }, | |
239 | - "deliveryLocation": { | |
240 | - "latitude": 49.8500, | |
241 | - "longitude": 24.0167 | |
242 | - }, | |
243 | - "deliveryAddress": { | |
244 | - "countryName": u"Україна", | |
245 | - "postalCode": "01008", | |
246 | - "region": u"м. Київ", | |
247 | - "locality": u"м. Київ", | |
248 | - "streetAddress": u"ул. Грушевского, 12/2" | |
249 | - }, | |
250 | - "classification": { | |
251 | - "scheme": u"CPV", | |
252 | - "id": u"44617100-9", | |
253 | - "description": u"Cartons" | |
254 | - }, | |
255 | - "additionalClassifications": [ | |
256 | - { | |
257 | - "scheme": u"ДКПП", | |
258 | - "id": u"17.29.12-00.00", | |
259 | - "description": u"Блоки, плити та пластини фільтрувальні, з паперової маси" | |
260 | - } | |
261 | - ], | |
262 | - "unit": { | |
263 | - "name": u"кілограм", | |
264 | - "code": u"KGM" | |
265 | - }, | |
266 | - "quantity": fake.pyint() | |
267 | - }, | |
268 | - { | |
269 | - "description": fake.catch_phrase(), | |
270 | - "deliveryDate": { | |
271 | - "endDate": (now + timedelta(days=5)).isoformat() | |
272 | - }, | |
273 | - "deliveryLocation": { | |
274 | - "latitude": 49.8500, | |
275 | - "longitude": 24.0167 | |
276 | - }, | |
277 | - "deliveryAddress": { | |
202 | + "title": fake.catch_phrase(), | |
203 | + "mode": "test", | |
204 | + "submissionMethodDetails": "quick", | |
205 | + "description": u"Тестовий тендер", | |
206 | + "description_en": "Test tender", | |
207 | + "description_ru": "Тестовый тендер", | |
208 | + "procuringEntity": { | |
209 | + "name": fake.company(), | |
210 | + "name_ru": fake_ru.company(), | |
211 | + "name_en": fake_en.company(), | |
212 | + "identifier": { | |
213 | + "scheme": u"UA-EDR", | |
214 | + "id": u"0000{}".format(fake.pyint()), | |
215 | + "uri": fake.image_url(width=None, height=None) | |
216 | + }, | |
217 | + "address": { | |
278 | 218 | "countryName": u"Україна", |
279 | 219 | "postalCode": fake.postalcode(), |
280 | 220 | "region": u"м. Київ", |
281 | 221 | "locality": u"м. Київ", |
282 | 222 | "streetAddress": fake.street_address() |
283 | 223 | }, |
284 | - "classification": { | |
285 | - "scheme": u"CPV", | |
286 | - "id": u"44617100-9", | |
287 | - "description": u"Cartons" | |
288 | - }, | |
289 | - "additionalClassifications": [ | |
290 | - { | |
291 | - "scheme": u"ДКПП", | |
292 | - "id": u"17.21.99-00.00", | |
293 | - "description": u"Роботи субпідрядні як частина виробництва гофрованих паперу й картону, паперової та картонної тари" | |
294 | - } | |
295 | - ], | |
296 | - "unit": { | |
297 | - "name": u"кілограм", | |
298 | - "code": u"KGM" | |
299 | - }, | |
300 | - "quantity": fake.pyint() | |
224 | + "contactPoint": { | |
225 | + "name": fake.name(), | |
226 | + "telephone": fake.phone_number() | |
227 | + } | |
301 | 228 | }, |
302 | - { | |
303 | - "description": fake.catch_phrase(), | |
304 | - "deliveryDate": { | |
305 | - "endDate": (now + timedelta(days=5)).isoformat() | |
306 | - }, | |
307 | - "deliveryLocation": { | |
308 | - "latitude": 49.3418, | |
309 | - "longitude": 39.1829 | |
310 | - }, | |
311 | - "deliveryAddress": { | |
312 | - "countryName": u"Україна", | |
313 | - "postalCode": fake.postalcode(), | |
314 | - "region": u"м. Луганськ", | |
315 | - "locality": u"м. Луганськ", | |
316 | - "streetAddress": u"Вул. Оборонна 28" | |
317 | - }, | |
318 | - "classification": { | |
319 | - "scheme": u"CPV", | |
320 | - "id": u"44617100-9", | |
321 | - "description": u"Cartons" | |
322 | - }, | |
323 | - "additionalClassifications": [ | |
324 | - { | |
325 | - "scheme": u"ДКПП", | |
326 | - "id": u"17.22.12-40.00", | |
327 | - "description": u"Вата; вироби з вати, інші" | |
328 | - } | |
329 | - ], | |
330 | - "unit": { | |
331 | - "name": u"кілограм", | |
332 | - "code": u"KGM" | |
333 | - }, | |
334 | - "quantity": fake.pyint() | |
229 | + "value": { | |
230 | + "amount": 50000.99, | |
231 | + "currency": u"UAH" | |
335 | 232 | }, |
336 | - { | |
337 | - "description": fake.catch_phrase(), | |
338 | - "deliveryDate": { | |
339 | - "endDate": (now + timedelta(days=5)).isoformat() | |
340 | - }, | |
341 | - "deliveryLocation": { | |
342 | - "latitude": 49.8500, | |
343 | - "longitude": 24.0167 | |
344 | - }, | |
345 | - "deliveryAddress": { | |
346 | - "countryName": u"Україна", | |
347 | - "postalCode": fake.postalcode(), | |
348 | - "region": u"м. Київ", | |
349 | - "locality": u"м. Київ", | |
350 | - "streetAddress": fake.street_address() | |
233 | + "minimalStep": { | |
234 | + "amount": 100.1, | |
235 | + "currency": u"UAH" | |
236 | + }, | |
237 | + "items": [ | |
238 | + { | |
239 | + "description": fake.catch_phrase(), | |
240 | + "deliveryDate": { | |
241 | + "endDate": (now + timedelta(days=5)).isoformat() | |
242 | + }, | |
243 | + "deliveryLocation": { | |
244 | + "latitude": 49.8500, | |
245 | + "longitude": 24.0167 | |
246 | + }, | |
247 | + "deliveryAddress": { | |
248 | + "countryName": u"Україна", | |
249 | + "postalCode": "01008", | |
250 | + "region": u"м. Київ", | |
251 | + "locality": u"м. Київ", | |
252 | + "streetAddress": u"ул. Грушевского, 12/2" | |
253 | + }, | |
254 | + "classification": { | |
255 | + "scheme": u"CPV", | |
256 | + "id": u"44617100-9", | |
257 | + "description": u"Cartons" | |
258 | + }, | |
259 | + "additionalClassifications": [ | |
260 | + { | |
261 | + "scheme": u"ДКПП", | |
262 | + "id": u"17.29.12-00.00", | |
263 | + "description": u"Блоки, плити та пластини фільтрувальні, з паперової маси" | |
264 | + } | |
265 | + ], | |
266 | + "unit": { | |
267 | + "name": u"кілограм", | |
268 | + "code": u"KGM" | |
269 | + }, | |
270 | + "quantity": fake.pyint() | |
351 | 271 | }, |
352 | - "classification": { | |
353 | - "scheme": u"CPV", | |
354 | - "id": u"44617100-9", | |
355 | - "description": u"Cartons" | |
272 | + { | |
273 | + "description": fake.catch_phrase(), | |
274 | + "deliveryDate": { | |
275 | + "endDate": (now + timedelta(days=5)).isoformat() | |
276 | + }, | |
277 | + "deliveryLocation": { | |
278 | + "latitude": 49.8500, | |
279 | + "longitude": 24.0167 | |
280 | + }, | |
281 | + "deliveryAddress": { | |
282 | + "countryName": u"Україна", | |
283 | + "postalCode": fake.postalcode(), | |
284 | + "region": u"м. Київ", | |
285 | + "locality": u"м. Київ", | |
286 | + "streetAddress": fake.street_address() | |
287 | + }, | |
288 | + "classification": { | |
289 | + "scheme": u"CPV", | |
290 | + "id": u"44617100-9", | |
291 | + "description": u"Cartons" | |
292 | + }, | |
293 | + "additionalClassifications": [ | |
294 | + { | |
295 | + "scheme": u"ДКПП", | |
296 | + "id": u"17.21.99-00.00", | |
297 | + "description": u"Роботи субпідрядні як частина виробництва гофрованих паперу й картону, паперової та картонної тари" | |
298 | + } | |
299 | + ], | |
300 | + "unit": { | |
301 | + "name": u"кілограм", | |
302 | + "code": u"KGM" | |
303 | + }, | |
304 | + "quantity": fake.pyint() | |
356 | 305 | }, |
357 | - "additionalClassifications": [ | |
358 | - { | |
359 | - "scheme": u"ДКПП", | |
360 | - "id": u"17.22.12-50.00", | |
361 | - "description": u"Одяг і речі до одягу з паперової маси, паперу, целюлозної вати чи полотна з целюлозного волокна (крім носових хусточок, наголовних уборів)" | |
362 | - } | |
363 | - ], | |
364 | - "unit": { | |
365 | - "name": u"кілограм", | |
366 | - "code": u"KGM" | |
306 | + { | |
307 | + "description": fake.catch_phrase(), | |
308 | + "deliveryDate": { | |
309 | + "endDate": (now + timedelta(days=5)).isoformat() | |
310 | + }, | |
311 | + "deliveryLocation": { | |
312 | + "latitude": 49.3418, | |
313 | + "longitude": 39.1829 | |
314 | + }, | |
315 | + "deliveryAddress": { | |
316 | + "countryName": u"Україна", | |
317 | + "postalCode": fake.postalcode(), | |
318 | + "region": u"м. Луганськ", | |
319 | + "locality": u"м. Луганськ", | |
320 | + "streetAddress": u"Вул. Оборонна 28" | |
321 | + }, | |
322 | + "classification": { | |
323 | + "scheme": u"CPV", | |
324 | + "id": u"44617100-9", | |
325 | + "description": u"Cartons" | |
326 | + }, | |
327 | + "additionalClassifications": [ | |
328 | + { | |
329 | + "scheme": u"ДКПП", | |
330 | + "id": u"17.22.12-40.00", | |
331 | + "description": u"Вата; вироби з вати, інші" | |
332 | + } | |
333 | + ], | |
334 | + "unit": { | |
335 | + "name": u"кілограм", | |
336 | + "code": u"KGM" | |
337 | + }, | |
338 | + "quantity": fake.pyint() | |
367 | 339 | }, |
368 | - "quantity": fake.pyint() | |
340 | + { | |
341 | + "description": fake.catch_phrase(), | |
342 | + "deliveryDate": { | |
343 | + "endDate": (now + timedelta(days=5)).isoformat() | |
344 | + }, | |
345 | + "deliveryLocation": { | |
346 | + "latitude": 49.8500, | |
347 | + "longitude": 24.0167 | |
348 | + }, | |
349 | + "deliveryAddress": { | |
350 | + "countryName": u"Україна", | |
351 | + "postalCode": fake.postalcode(), | |
352 | + "region": u"м. Київ", | |
353 | + "locality": u"м. Київ", | |
354 | + "streetAddress": fake.street_address() | |
355 | + }, | |
356 | + "classification": { | |
357 | + "scheme": u"CPV", | |
358 | + "id": u"44617100-9", | |
359 | + "description": u"Cartons" | |
360 | + }, | |
361 | + "additionalClassifications": [ | |
362 | + { | |
363 | + "scheme": u"ДКПП", | |
364 | + "id": u"17.22.12-50.00", | |
365 | + "description": u"Одяг і речі до одягу з паперової маси, паперу, целюлозної вати чи полотна з целюлозного волокна (крім носових хусточок, наголовних уборів)" | |
366 | + } | |
367 | + ], | |
368 | + "unit": { | |
369 | + "name": u"кілограм", | |
370 | + "code": u"KGM" | |
371 | + }, | |
372 | + "quantity": fake.pyint() | |
373 | + } | |
374 | + ], | |
375 | + "enquiryPeriod": { | |
376 | + "startDate": (now).isoformat(), | |
377 | + "endDate": (now + timedelta(minutes=1)).isoformat() | |
378 | + }, | |
379 | + "tenderPeriod": { | |
380 | + "startDate": (now + timedelta(minutes=2)).isoformat(), | |
381 | + "endDate": (now + timedelta(minutes=(2 + period_interval))).isoformat() | |
369 | 382 | } |
370 | - ], | |
371 | - "enquiryPeriod": { | |
372 | - "startDate": (now).isoformat(), | |
373 | - "endDate": (now + timedelta(minutes=1)).isoformat() | |
374 | - }, | |
375 | - "tenderPeriod": { | |
376 | - "startDate": (now + timedelta(minutes=2)).isoformat(), | |
377 | - "endDate": (now + timedelta(minutes=(2+period_interval))).isoformat() | |
378 | 383 | } |
379 | -} | |
384 | + | |
380 | 385 | |
381 | 386 | def test_question_data(): |
382 | 387 | return munchify({ |
... | ... | @@ -413,6 +418,7 @@ def test_question_answer_data(): |
413 | 418 | } |
414 | 419 | }) |
415 | 420 | |
421 | + | |
416 | 422 | def test_complaint_data(): |
417 | 423 | return munchify({ |
418 | 424 | "data": { |
... | ... | @@ -440,9 +446,10 @@ def test_complaint_data(): |
440 | 446 | } |
441 | 447 | }) |
442 | 448 | |
449 | + | |
443 | 450 | def test_complaint_reply_data(): |
444 | 451 | return munchify({ |
445 | - "data": { | |
452 | + "data": { | |
446 | 453 | "status": "resolved" |
447 | 454 | } |
448 | 455 | }) |
... | ... | @@ -477,13 +484,15 @@ def test_bid_data(): |
477 | 484 | } |
478 | 485 | }) |
479 | 486 | |
487 | + | |
480 | 488 | def auction_bid(): |
481 | 489 | return munchify({ |
482 | - "data": {"value": { | |
483 | - "amount": 200, | |
484 | - "currency": "UAH", | |
485 | - "valueAddedTaxIncluded": true | |
486 | - } | |
490 | + "data": { | |
491 | + "value": { | |
492 | + "amount": 200, | |
493 | + "currency": "UAH", | |
494 | + "valueAddedTaxIncluded": true | |
495 | + } | |
487 | 496 | } |
488 | 497 | }) |
489 | 498 | ... | ... |
Please
register
or
login
to post a comment