Skip to content

Commit

Permalink
add test cases for unquoted yaml in redirect parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Walavouchey committed Nov 23, 2023
1 parent a12c8f3 commit 3c78b7a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_redirect_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ def test__parse_redirects(self, tmpdir):
"ignore_list": "Client/Options/Ignore_list"
"ignore": "Client/Options/Ignore_list"
unquoted_key1: unquoted/value1
"quoted_key": unquoted/value2
unquoted_key2: "quoted/value"
''').strip())

redirects = redirect_parser.load_redirects(str(path))
Expand All @@ -22,4 +25,7 @@ def test__parse_redirects(self, tmpdir):
'asc/images': ('Article_Styling_Criteria#images', 4),
'ignore_list': ('Client/Options/Ignore_list', 6),
'ignore': ('Client/Options/Ignore_list', 7),
'unquoted_key1': ('unquoted/value1', 8),
'quoted_key': ('unquoted/value2', 9),
'unquoted_key2': ('quoted/value', 10),
}

0 comments on commit 3c78b7a

Please sign in to comment.