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