def auction_change_fields(test_case): new_data = {} field = "title" new_value = 'New Title' new_data[field] = new_value field = "bankAccount" new_value = { "bankName": "New Test bank name", "description": u"Test Bank Account", "accountIdentification": [{ "scheme": u'UA-EDR', "id": u"66113000-5", "description": u"Test" }] } new_data[field] = new_value field = "budgetSpent" new_value = {"amount": 42, "currency": u"UAH"} new_data[field] = new_value field = "contractTerms" new_value = { "type": "lease", "leaseTerms": { "leaseDuration": "P11Y", } } new_data[field] = new_value field = "description" new_value = 'New description' new_data[field] = new_value field = "guarantee" new_value = {"amount": 42, "currency": u"UAH"} new_data[field] = new_value field = "guarantee" new_value = {"amount": 42, "currency": u"UAH"} field = "lotHolder" new_lotHolder = test_organization.copy() new_lotHolder['name'] = 'New Name' new_value = new_lotHolder new_data[field] = new_value field = "lotIdentifier" new_value = "219570" new_data[field] = new_value field = "minimalStep" new_value = {"amount": 42, "currency": u"UAH"} field = "procuringEntity" new_procuringEntity = test_organization.copy() new_procuringEntity['name'] = 'New Name' new_value = new_procuringEntity new_data[field] = new_value field = "registrationFee" new_value = {"amount": 703, "currency": u"UAH"} new_data[field] = new_value field = "tenderAttempts" new_value = 2 new_data[field] = new_value field = "value" new_value = {"amount": 123, "currency": u"UAH"} new_data[field] = new_value request_data = {"data": new_data} test_case.app.patch_json(test_case.ENTRYPOINTS['patch_auction'], request_data) response = test_case.app.get(test_case.ENTRYPOINTS['get_auction']) auction = response.json['data'] for field, value in new_data.items(): recieve_field = auction[field] test_case.assertNotEqual(recieve_field, new_data[field])
} } } test_bankAccount = { "bankName": "Test bank name", "description": u"Test Bank Account", "accountIdentification": [{ "scheme": u'UA-EDR', "id": u"66113000-5", "description": u"Test" }] } now = datetime.now() test_procuringEntity = test_organization.copy() test_lotHolder = test_organization.copy() test_item = { "description": u"Земля для військовослужбовців", "classification": { "scheme": u"CAV-PS", "id": "06110000-6", "description": u"Земельні ділянки" }, "additionalClassifications": [ { "scheme": u"kvtspz", "id": "01.04", "description": "Test" },
from openprocurement.auctions.core.utils import (apply_data_patch, get_now, SANDBOX_MODE) from openprocurement.auctions.rubble.constants import ( DEFAULT_PROCUREMENT_METHOD_TYPE_FINANCIAL, DEFAULT_PROCUREMENT_METHOD_TYPE_OTHER) from openprocurement.auctions.rubble.tests.fixtures import PARTIAL_MOCK_CONFIG from openprocurement.auctions.core.tests.base import MOCK_CONFIG as BASE_MOCK_CONFIG from openprocurement.auctions.core.utils import connection_mock_config DEFAULT_ACCELERATION = 1440 now = datetime.now() test_procuringEntity = test_organization.copy() test_item = { "description": u"Земля для військовослужбовців", "classification": { "scheme": u"CPV", "id": u"66113000-5", "description": u"Земельні ділянки" }, "unit": { "name": u"item", "code": u"44617100-9" }, "quantity": 5.001, "contractPeriod": { "startDate": (now + timedelta(days=2)).isoformat(),