-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a1d177
commit ffe50c6
Showing
2 changed files
with
15 additions
and
14 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
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 |
---|---|---|
|
@@ -18,14 +18,20 @@ def test_no_annotations(): | |
assert get_annotations(resource) == {} | ||
|
||
|
||
def test_non_alphanum_to_hyphen(): | ||
def test_rfc1123_non_alphanum_to_hyphen(): | ||
name = "[email protected]" | ||
|
||
assert to_rfc1123_compliant(name) == "kimonas-canonical-com" | ||
|
||
|
||
def test_more_than_63_char_name(): | ||
def test_rfc1123_more_than_63_char_name(): | ||
name = "I-had-to-think-of-a-reeeally-long-string-to-use-for-the-test-which-was-tough" | ||
|
||
assert len(name) > 63 | ||
assert len(to_rfc1123_compliant(name)) == 63 | ||
|
||
|
||
def test_rfc1123_strip_starting_and_trailing_dashes(): | ||
name = "-=shouldn't have trailing dashes!" | ||
|
||
assert to_rfc1123_compliant(name) == "shouldn-t-have-trailing-dashes" |