Commit 91e84357d424c901f039a2b25ac8a601cf4f24c7
1 parent
8a97cfda
Maintain PEP8 compliance
Also: Add 2 blank lines between all keywords in keywords.robot
Showing
3 changed files
with
14 additions
and
5 deletions
... | ... | @@ -431,7 +431,6 @@ def test_change_cancellation_document_field_data(key, value): |
431 | 431 | }) |
432 | 432 | |
433 | 433 | |
434 | - | |
435 | 434 | def test_confirm_data(ID): |
436 | 435 | return munchify({ |
437 | 436 | "data": { |
... | ... | @@ -454,14 +453,14 @@ def test_additional_items_data(tender_id, access_token): |
454 | 453 | return munchify({ |
455 | 454 | "access": { |
456 | 455 | "token": access_token |
457 | - }, | |
456 | + }, | |
458 | 457 | "data": { |
459 | 458 | "id": tender_id, |
460 | - "items": [{ | |
459 | + "items": [{ | |
461 | 460 | "unit": { |
462 | 461 | "code": "MON", |
463 | 462 | "name": "month" |
464 | - }, | |
463 | + }, | |
465 | 464 | "quantity": 9 |
466 | 465 | }] |
467 | 466 | } |
... | ... | @@ -740,6 +739,7 @@ def test_tender_data_openua(intervals): |
740 | 739 | 'accelerator={}'.format(accelerator) |
741 | 740 | return t_data |
742 | 741 | |
742 | + | |
743 | 743 | def test_tender_data_openeu(intervals): |
744 | 744 | accelerator = intervals['accelerator'] |
745 | 745 | # Since `accelerator` field is not really a list containing timings | ... | ... |
... | ... | @@ -10,6 +10,7 @@ Documentation |
10 | 10 | ... This resource file contains keywords that are used directly by |
11 | 11 | ... test suites or by brokers' keyword libraries (also known as drivers). |
12 | 12 | |
13 | + | |
13 | 14 | *** Keywords *** |
14 | 15 | Test Suite Setup |
15 | 16 | Set Suite Variable ${WARN_RUN_AS} ${False} |
... | ... | @@ -17,10 +18,12 @@ Test Suite Setup |
17 | 18 | Set Selenium Timeout 10 s |
18 | 19 | Завантажуємо дані про користувачів і майданчики |
19 | 20 | |
21 | + | |
20 | 22 | Test Suite Teardown |
21 | 23 | Close all browsers |
22 | 24 | Run Keyword And Ignore Error Створити артефакт |
23 | 25 | |
26 | + | |
24 | 27 | Set Suite Variable With Default Value |
25 | 28 | [Arguments] ${suite_var} ${def_value} |
26 | 29 | ${tmp}= Get Variable Value ${${suite_var}} ${def_value} |
... | ... | @@ -82,6 +85,7 @@ Get Broker Property By Username |
82 | 85 | ${broker_name}= Get Variable Value ${USERS.users['${username}'].broker} |
83 | 86 | Run Keyword And Return Get Broker Property ${broker_name} ${property} |
84 | 87 | |
88 | + | |
85 | 89 | Створити артефакт |
86 | 90 | ${artifact}= Create Dictionary |
87 | 91 | ... api_version=${api_version} |
... | ... | @@ -96,6 +100,7 @@ Get Broker Property By Username |
96 | 100 | Log ${artifact} |
97 | 101 | log_object_data ${artifact} artifact update=${True} |
98 | 102 | |
103 | + | |
99 | 104 | Завантажити дані про тендер |
100 | 105 | ${file_path}= Get Variable Value ${ARTIFACT_FILE} artifact.yaml |
101 | 106 | ${ARTIFACT}= load_initial_data_from ${file_path} |
... | ... | @@ -165,6 +170,7 @@ Get Broker Property By Username |
165 | 170 | Set To Dictionary ${USERS.users['${username}']} cancellation_data ${cancellation_data} |
166 | 171 | [Return] ${cancellation_data} |
167 | 172 | |
173 | + | |
168 | 174 | Завантажуємо бібліотеку з реалізацією для майданчика ${keywords_file} |
169 | 175 | ${bundled_st}= Run Keyword And Return Status Import Resource ${CURDIR}${/}brokers${/}${keywords_file}.robot |
170 | 176 | ${external_st}= Run Keyword And Return Status Import Resource ${CURDIR}${/}..${/}..${/}src${/}robot_tests.broker.${keywords_file}${/}${keywords_file}.robot |
... | ... | @@ -387,6 +393,7 @@ Require Failure |
387 | 393 | Log ${username} |
388 | 394 | Дочекатись дати ${USERS.users['${username}'].tender_data.data.auctionPeriod.endDate} |
389 | 395 | |
396 | + | |
390 | 397 | Дочекатись дати закінчення періоду подання скарг |
391 | 398 | [Arguments] ${username} |
392 | 399 | log ${username} | ... | ... |
... | ... | @@ -117,7 +117,7 @@ def log_object_data(data, file_name=None, format="yaml", update=False): |
117 | 117 | file_obj.truncate() |
118 | 118 | except IOError as e: |
119 | 119 | LOGGER.log_message(Message(e, "INFO")) |
120 | - LOGGER.log_message(Message("Nothing to update, "\ | |
120 | + LOGGER.log_message(Message("Nothing to update, " | |
121 | 121 | "creating new file.", "INFO")) |
122 | 122 | data_obj = munch_to_object(data, format) |
123 | 123 | with open(file_path, "w") as file_obj: |
... | ... | @@ -125,12 +125,14 @@ def log_object_data(data, file_name=None, format="yaml", update=False): |
125 | 125 | data_obj = munch_to_object(data, format) |
126 | 126 | LOGGER.log_message(Message(data_obj.decode('utf-8'), "INFO")) |
127 | 127 | |
128 | + | |
128 | 129 | def munch_from_object(data, format="yaml"): |
129 | 130 | if format.lower() == 'json': |
130 | 131 | return Munch.fromJSON(data) |
131 | 132 | else: |
132 | 133 | return Munch.fromYAML(data) |
133 | 134 | |
135 | + | |
134 | 136 | def munch_to_object(data, format="yaml"): |
135 | 137 | if format.lower() == 'json': |
136 | 138 | return data.toJSON(indent=2) | ... | ... |
Please
register
or
login
to post a comment