File: test_utils.py

package info (click to toggle)
python-proton-vpn-api-core 0.39.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 892 kB
  • sloc: python: 6,582; makefile: 8
file content (14 lines) | stat: -rw-r--r-- 494 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import pytest

from proton.vpn.session.utils import to_semver_build_metadata_format


@pytest.mark.parametrize("input,expected_output", [
    ("x86_64", "x86-64"),  # Underscores are replaced by hyphens
    ("aarch64", "aarch64"),
    ("!@#$%^&*()+=<>~,./?\\|[]{} ", ""),  # Only alphanumeric characters and hyphens allowed.
    ("", ""),
    (None, None)
])
def test_to_semver_build_metadata_format(input, expected_output):
    assert to_semver_build_metadata_format(input) == expected_output