# Path: pydov/util/dovutil.py
# def build_dov_url(path):
#     """Build the DOV url consisting of the fixed DOV base url, appended with
#     the given path.
# 
#     Returns
#     -------
#     str
#         The absolute DOV url.
# 
#     """
#     if 'PYDOV_BASE_URL' in os.environ:
#         base_url = os.environ['PYDOV_BASE_URL']
#     else:
#         base_url = 'https://www.dov.vlaanderen.be/'
# 
#     return base_url + path.lstrip('/')


import gzip
import os
import time
import pytest
from pydov.util.dovutil import build_dov_url

        plaintext_cache.remove()
        assert not os.path.exists(cached_file)
        assert not os.path.exists(plaintext_cache.cachedir)

    @pytest.mark.parametrize('plaintext_cache', [[]],
                             indirect=['plaintext_cache'])
    def test_get_save(self, plaintext_cache, mp_remote_xml):
        """Test the get method.

        Test whether the document is saved in the cache.

        Parameters
        ----------
        plaintext_cache : pytest.fixture providing
                pydov.util.caching.PlainTextFileCache
            PlainTextFileCache using a temporary directory and a maximum age
            of 1 second.
        mp_remote_xml : pytest.fixture
            Monkeypatch the call to the remote DOV service returning an XML
            document.

        """
        cached_file = os.path.join(
            plaintext_cache.cachedir, 'boring', '2004-103984.xml')

        plaintext_cache.clean()
        assert not os.path.exists(cached_file)

        plaintext_cache.get(

# Path: pydov/util/dovutil.py
# def build_dov_url(path):
#     """Build the DOV url consisting of the fixed DOV base url, appended with
#     the given path.
# 
#     Returns
#     -------
#     str
#         The absolute DOV url.
# 
#     """
#     if 'PYDOV_BASE_URL' in os.environ:
#         base_url = os.environ['PYDOV_BASE_URL']
#     else:
#         base_url = 'https://www.dov.vlaanderen.be/'
# 
#     return base_url + path.lstrip('/')


# Path: tests/test_util_caching.py
import gzip
import os
import time
import pytest
from pydov.util.dovutil import build_dov_url


        plaintext_cache.remove()
        assert not os.path.exists(cached_file)
        assert not os.path.exists(plaintext_cache.cachedir)

    @pytest.mark.parametrize('plaintext_cache', [[]],
                             indirect=['plaintext_cache'])
    def test_get_save(self, plaintext_cache, mp_remote_xml):
        """Test the get method.

        Test whether the document is saved in the cache.

        Parameters
        ----------
        plaintext_cache : pytest.fixture providing
                pydov.util.caching.PlainTextFileCache
            PlainTextFileCache using a temporary directory and a maximum age
            of 1 second.
        mp_remote_xml : pytest.fixture
            Monkeypatch the call to the remote DOV service returning an XML
            document.

        """
        cached_file = os.path.join(
            plaintext_cache.cachedir, 'boring', '2004-103984.xml')

        plaintext_cache.clean()
        assert not os.path.exists(cached_file)

        plaintext_cache.get(

            build_dov_url('data/boring/2004-103984.xml'))