mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Use unicode slugify (#19192)
* Update __init__.py * Update setup.py * Update requirements_all.txt * Update __init__.py * Update __init__.py * Update __init__.py * Update __init__.py * Update __init__.py * remove `-` * fix packages * Update package_constraints.txt * Update __init__.py * Update package_constraints.txt * Update requirements_all.txt * Update setup.py * Fix tests * Fix line issue * fix all test * fix type * Fix lint
This commit is contained in:
@@ -27,17 +27,19 @@ class TestUtil(unittest.TestCase):
|
||||
|
||||
def test_slugify(self):
|
||||
"""Test slugify."""
|
||||
assert "test" == util.slugify("T-!@#$!#@$!$est")
|
||||
assert "t_est" == util.slugify("T-!@#$!#@$!$est")
|
||||
assert "test_more" == util.slugify("Test More")
|
||||
assert "test_more" == util.slugify("Test_(More)")
|
||||
assert "test_more" == util.slugify("Tèst_Mörê")
|
||||
assert "b827eb000000" == util.slugify("B8:27:EB:00:00:00")
|
||||
assert "testcom" == util.slugify("test.com")
|
||||
assert "greg_phone__exp_wayp1" == \
|
||||
assert "b8_27_eb_00_00_00" == util.slugify("B8:27:EB:00:00:00")
|
||||
assert "test_com" == util.slugify("test.com")
|
||||
assert "greg_phone_exp_wayp1" == \
|
||||
util.slugify("greg_phone - exp_wayp1")
|
||||
assert "we_are_we_are_a_test_calendar" == \
|
||||
util.slugify("We are, we are, a... Test Calendar")
|
||||
assert "test_aouss_aou" == util.slugify("Tèst_äöüß_ÄÖÜ")
|
||||
assert "ying_shi_ma" == util.slugify("影師嗎")
|
||||
assert "keihuonto" == util.slugify("けいふぉんと")
|
||||
|
||||
def test_repr_helper(self):
|
||||
"""Test repr_helper."""
|
||||
|
||||
Reference in New Issue
Block a user