Example #1
0
 def test_to_lower_case(self):
     raw = 'HELLO WORLD'
     result = make_id_safe(raw)
     self.assertEqual('hello-world', result)
Example #2
0
 def test_replaces_spaces_with_minus(self):
     raw = 'hello world'
     result = make_id_safe(raw)
     self.assertEqual('hello-world', result)
Example #3
0
 def test_strips_whitespace(self):
     raw = ' hello world!'
     result = make_id_safe(raw)
     self.assertEqual('hello-world', result)
Example #4
0
 def test_removes_all_non_alpha_numerics(self):
     raw = ';:"hello@<>/&'
     result = make_id_safe(raw)
     self.assertEqual('hello', result)