# Path: pydov/util/dovutil.py
# def build_dov_url(path):
# def get_remote_url(url, session=None):
# def get_xsd_schema(url):
# def get_dov_xml(url, session=None):
# def parse_dov_xml(xml_data):


import copy
import os
import pytest
from pydov.util import dovutil
"""Module grouping tests for the pydov.util.owsutil module."""



env_var = "PYDOV_BASE_URL"


@pytest.fixture
def pydov_base_url_environment():
    """Fixture for setting an environment variable with a different base_url.
    """
    old_environ = copy.deepcopy(os.environ)
    os.environ[env_var] = 'https://dov/'

    yield

    os.environ = old_environ


class TestDovutil(object):
    """Class grouping tests for the pydov.util.dovutil module."""

    def test_get_default_dov_base_url_slash(self):
        if env_var not in os.environ:
            assert dovutil.build_dov_url('/geonetwork') == \
                   'https://www.dov.vlaanderen.be/geonetwork'

    def test_get_default_dov_base_url_multislash(self):
        if env_var not in os.environ:

# Path: pydov/util/dovutil.py
# def build_dov_url(path):
# def get_remote_url(url, session=None):
# def get_xsd_schema(url):
# def get_dov_xml(url, session=None):
# def parse_dov_xml(xml_data):


# Path: tests/test_util_dovutil.py
import copy
import os
import pytest
from pydov.util import dovutil

"""Module grouping tests for the pydov.util.owsutil module."""



env_var = "PYDOV_BASE_URL"


@pytest.fixture
def pydov_base_url_environment():
    """Fixture for setting an environment variable with a different base_url.
    """
    old_environ = copy.deepcopy(os.environ)
    os.environ[env_var] = 'https://dov/'

    yield

    os.environ = old_environ


class TestDovutil(object):
    """Class grouping tests for the pydov.util.dovutil module."""

    def test_get_default_dov_base_url_slash(self):
        if env_var not in os.environ:
            assert dovutil.build_dov_url('/geonetwork') == \
                   'https://www.dov.vlaanderen.be/geonetwork'

    def test_get_default_dov_base_url_multislash(self):
        if env_var not in os.environ:

            assert dovutil.build_dov_url('/geonetwork/srv') == \