def pytest_generate_tests(metafunc): # called once per each test function if 'api' in metafunc.funcargnames and 'operation' in metafunc.funcargnames: for version in TESTABLE_API_VERSIONS: wsdl = os.path.join(XML_TEST_DIR, version, 'AWSECommerceService.wsdl') if not os.path.exists(wsdl): continue api = API('', '', 'de') api.VERSION = version for operation in extract_operations_from_wsdl(wsdl): metafunc.addcall( id='%s/%s' % (version, operation), funcargs={'api' : api, 'operation' : operation})
def pytest_generate_tests(metafunc): # called once per each test function if "api" in metafunc.funcargnames and "operation" in metafunc.funcargnames: for version in metafunc.config.option.versions or TESTABLE_API_VERSIONS: wsdl = os.path.join(XML_TEST_DIR, version, "AWSECommerceService.wsdl") if not os.path.exists(wsdl): operations = ["???"] else: operations = extract_operations_from_wsdl(wsdl) for operation in operations: metafunc.addcall( id="%s/%s" % (version, operation), param={"operation": operation, "version": version, "wsdl_path": wsdl}, )
def pytest_generate_tests(metafunc): # called once per each test function if 'api' in metafunc.funcargnames and 'operation' in metafunc.funcargnames: for version in metafunc.config.option.versions or TESTABLE_API_VERSIONS: wsdl = os.path.join(XML_TEST_DIR, version, 'AWSECommerceService.wsdl') if not os.path.exists(wsdl): operations = ['???'] else: operations = extract_operations_from_wsdl(wsdl) for operation in operations: metafunc.addcall( id='%s/%s' % (version, operation), param={'operation' : operation, 'version' : version, 'wsdl_path' : wsdl})
def pytest_generate_tests(metafunc): # called once per each test function if 'api' in metafunc.funcargnames and 'operation' in metafunc.funcargnames: for version in metafunc.config.option.versions or TESTABLE_API_VERSIONS: wsdl = os.path.join(XML_TEST_DIR, version, 'AWSECommerceService.wsdl') if not os.path.exists(wsdl): operations = ['???'] else: operations = extract_operations_from_wsdl(wsdl) for operation in operations: metafunc.addcall(id='%s/%s' % (version, operation), param={ 'operation': operation, 'version': version, 'wsdl_path': wsdl })