Skip to content

Commit

Permalink
fix: add missing assert
Browse files Browse the repository at this point in the history
  • Loading branch information
GetPsyched committed Nov 4, 2024
1 parent 7c86784 commit e59d478
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkgs/tools/nix/nixos-render-docs/src/tests/test_redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ def test_basic_redirect_matching(self):
result = redirects.get_client_redirects("index.html")
expected_redirects = {'some-section': 'index.html#foo', 'another-section': 'index.html#foo'}
expected_script = f"const redirects = {json.dumps(expected_redirects)};"

self.assertEqual(result, expected_script)

def test_advanced_redirect_matching(self):
Expand All @@ -203,15 +202,14 @@ def test_advanced_redirect_matching(self):
},
"const redirects = REDIRECTS_PLACEHOLDER;",
)

self.assertEqual(redirects.get_client_redirects("index.html"), "const redirects = {};")

result = redirects.get_client_redirects("foo.html")
expected_redirects = {'some-section': 'foo.html#foo'}
expected_script = f"const redirects = {json.dumps(expected_redirects)};"
self.assertEqual(result, expected_script)

result = redirects.get_client_redirects("bar.html")
expected_redirects = {'foo': 'foo.html#foo', 'another-section': 'bar.html#bar'}
expected_script = f"const redirects = {json.dumps(expected_redirects)};"

self.assertEqual(result, expected_script)

0 comments on commit e59d478

Please sign in to comment.