File: test_UUIDExtension.py

package info (click to toggle)
python-briefcase 0.3.25-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,596 kB
  • sloc: python: 62,519; makefile: 60
file content (19 lines) | stat: -rw-r--r-- 481 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from unittest.mock import MagicMock

import pytest

from briefcase.integrations.cookiecutter import UUIDExtension


@pytest.mark.parametrize(
    "value, expected",
    [
        ("example.com", "cfbff0d1-9375-5685-968c-48ce8b15ae17"),
        ("foobar.example.com", "941bbcd9-03e1-568a-a728-8434055bc338"),
    ],
)
def test_dns_uuid5_value(value, expected):
    env = MagicMock()
    env.filters = {}
    UUIDExtension(env)
    assert env.filters["dns_uuid5"](value) == expected