File: test_normalize_scheme.py

package info (click to toggle)
url-normalize 2.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 268 kB
  • sloc: python: 935; makefile: 16; sh: 8
file content (18 lines) | stat: -rw-r--r-- 474 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""Tests for normalize_scheme function."""

import pytest

from url_normalize.url_normalize import normalize_scheme


@pytest.mark.parametrize(
    ("scheme", "expected"),
    [
        ("http", "http"),
        ("HTTP", "http"),
    ],
)
def test_normalize_scheme_result_is_expected(scheme: str, expected: str) -> None:
    """Assert we got expected results from the normalize_scheme function."""
    result = normalize_scheme(scheme)
    assert result == expected, scheme