aboutsummaryrefslogtreecommitdiff
path: root/tests/url_patterns_common.py
blob: de6651dabf2d880526eb8ecf0adfac7f285c1577 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# SPDX-License-Identifier: CC0-1.0

# Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
#
# Available under the terms of Creative Commons Zero v1.0 Universal.

import pytest

from hydrilla import url_patterns

sample_url_str = 'http://example.com/aa/bb'

@pytest.fixture(scope='session')
def sample_url_parsed():
    """Generate a simple ParsedUrl object."""
    return url_patterns.ParsedUrl(
        orig_url           = sample_url_str,
        scheme             = 'http',
        domain_labels      = ('com', 'example'),
        path_segments      = ('aa', 'bb'),
        has_trailing_slash = False,
        port               = 80
    )