def test_clean_key_returns_string_without_curly_braces(): result = views._clean_key('/books/add') assert result == '/books/add'
def test_key_with_spaces_is_transformed_into_a_pattern(): result = views._clean_key('/books/{ book_id }') assert result == '/books/(?P<book_id>[-\w]+)'