Commit 37eec9b23d0851e59a6f241017a37def34192689
Committed by
GitHub
Merge pull request #97 from ProzorroUKR/float_quantity
quantity_float
Showing
4 changed files
with
7 additions
and
2 deletions
... | ... | @@ -52,6 +52,10 @@ def create_fake_number(min_number, max_number): |
52 | 52 | return random.randint(int(min_number), int(max_number)) |
53 | 53 | |
54 | 54 | |
55 | +def create_fake_number_float(min_number, max_number): | |
56 | + return round(random.uniform(float(min_number), float(max_number)), 3) | |
57 | + | |
58 | + | |
55 | 59 | def create_fake_title(): |
56 | 60 | return u"[ТЕСТУВАННЯ] {}".format(fake.title()) |
57 | 61 | ... | ... |
... | ... | @@ -162,7 +162,7 @@ class OP_Provider(BaseProvider): |
162 | 162 | "deliveryAddress": address["deliveryAddress"], |
163 | 163 | "deliveryLocation": address["deliveryLocation"], |
164 | 164 | "unit": item_base_data["unit"], |
165 | - "quantity": self.randomize_nb_elements(number=item_base_data["quantity"], le=80, ge=120) | |
165 | + "quantity": round(random.uniform(3, 150), 3) | |
166 | 166 | } |
167 | 167 | if item_base_data["cpv_id"] == "99999999-9": |
168 | 168 | scheme = classification["additionalClassifications"][0]["scheme"] | ... | ... |
... | ... | @@ -93,7 +93,7 @@ ${MOZ_INTEGRATION} ${False} |
93 | 93 | ... critical |
94 | 94 | [Setup] Дочекатись синхронізації з майданчиком ${tender_owner} |
95 | 95 | [Teardown] Оновити LAST_MODIFICATION_DATE |
96 | - ${new_quantity}= create_fake_number ${1} ${USERS.users['${tender_owner}'].tender_data.data['items'][0]['quantity']} | |
96 | + ${new_quantity}= create_fake_number_float ${1} ${USERS.users['${tender_owner}'].tender_data.data['items'][0]['quantity']} | |
97 | 97 | Можливість змінити поле items[0].quantity тендера на ${new_quantity} |
98 | 98 | |
99 | 99 | ... | ... |
Please
register
or
login
to post a comment