def pytest_runtest_setup(item): """Set test variables that depend on dev server used (`dev` or `dev_destructive`): * environment.app_url * dev_log_retriever """ if CustomPytestScheduling.is_destructive_test(item.name, str(item.cls)): environment.app_url = os.environ["DEV_DESTRUCTIVE_URL"] filename = os.environ["DEV_DESTRUCTIVE_LOG"] else: environment.app_url = os.environ["DEV_URL"] filename = os.environ["DEV_LOG"] environment.app_url = urlparse.urljoin(environment.app_url, "/") item.dev_log_retriever = conftest_utils.DevLogRetriever(filename)
def pytest_runtest_setup(item): """Set test variables that depend on dev server used (`dev` or `dev_destructive`): * environment.app_url * dev_log_retriever """ if DESTRUCTIVE_TEST_METHOD_PREFIX in item.name: environment.app_url = os.environ["DEV_DESTRUCTIVE_URL"] filename = os.environ["DEV_DESTRUCTIVE_LOG"] else: environment.app_url = os.environ["DEV_URL"] filename = os.environ["DEV_LOG"] environment.app_url = urlparse.urljoin(environment.app_url, "/") item.dev_log_retriever = conftest_utils.DevLogRetriever(filename)