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})