-
-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1850 from freakboy3742/cookiecutter-uuid
Add a UUID cookiecutter extension.
- Loading branch information
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
A UUID cookiecutter extension was added to support Windows MSI templating. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |