def dov_proxy_no_xdov():
    """Fixture to start the DOV proxy and set PYDOV_BASE_URL to route
    traffic through it.

    The DOV proxy behaves as the XDOV server would be unavailable.

    """
    process = Popen([sys.executable,
                     os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                  'stub', 'dov_proxy.py'),
                     '--dov-base-url', build_dov_url('/'),
                     '--no-xdov'])
    time.sleep(2)

    orig_base_url = os.environ.get('PYDOV_BASE_URL', None)
    os.environ['PYDOV_BASE_URL'] = 'http://localhost:1337/'

    yield

    if orig_base_url is not None:
        os.environ['PYDOV_BASE_URL'] = orig_base_url
    else:
        del(os.environ['PYDOV_BASE_URL'])

    process.terminate()
    process.communicate()