"aliases": [], "accreditation": { "create": [1], "edit": [2] } } } MOCK_CONFIG_PARTIAL_AUCTION = { "url": "http://auction-sandbox.openprocurement.org", "public_key": "fe3b3b5999a08e68dfe62687c2ae147f62712ceace58c1ffca8ea819eabcb5d1" } MOCK_CONFIG = connection_mock_config(PARTIAL_MOCK_CONFIG, base=BASE_MOCK_CONFIG, connector=('plugins', 'api', 'plugins', 'auctions.core', 'plugins')) TEST_ROUTE_PREFIX = '/api/{}'.format( MOCK_CONFIG['config']['main']['api_version']) MOCK_CONFIG = connection_mock_config(MOCK_CONFIG_PARTIAL_AUCTION, base=MOCK_CONFIG, connector=('config', 'auction')) test_appraisal_auction_data = deepcopy(test_auction_data) test_appraisal_auction_data['auctionPeriod'] = { 'startDate': calculate_business_date(now, timedelta(days=8), None, working_days=True).isoformat() }
test_financial_organization = deepcopy(test_organization) test_financial_organization['additionalIdentifiers'] = [{ "scheme": u"UA-FIN", "id": u"А01 457213" }] test_financial_bids = [] for i in test_bids: bid = deepcopy(i) bid.update({'eligible': True}) bid['tenderers'] = [test_financial_organization] test_financial_bids.append(bid) MOCK_CONFIG = connection_mock_config(PARTIAL_MOCK_CONFIG, base=BASE_MOCK_CONFIG, connector=('plugins', 'api', 'plugins', 'auctions.core', 'plugins')) class BaseWebTest(CoreBaseWebTest): """Base Web Test to test openprocurement.auctions.lease. It setups the database before each test and delete it after. """ relative_to = os.path.dirname(__file__) mock_config = MOCK_CONFIG class BaseAuctionWebTest(CoreBaseAuctionWebTest):
""" return FunctionType(func.func_code, func.func_globals, 'test_' + func.func_name, closure=func.func_closure) class PrefixedRequestClass(webtest.app.TestRequest): @classmethod def blank(cls, path, *args, **kwargs): path = '/api/%s%s' % (VERSION, path) return webtest.app.TestRequest.blank(path, *args, **kwargs) MOCK_CONFIG = connection_mock_config(PARTIAL_MOCK_CONFIG, ('plugins', 'api', 'plugins'), BASE_MOCK_CONFIG) class BaseWebTest(CoreWebTest): mock_config = MOCK_CONFIG class BaseAuctionWebTest(BaseResourceWebTest): initial_data = None initial_status = None initial_bids = None initial_lots = None docservice = False mock_config = MOCK_CONFIG