From e59d47885c03210ae1a03be503a250cb526ed923 Mon Sep 17 00:00:00 2001 From: GetPsyched Date: Mon, 4 Nov 2024 15:38:33 +0400 Subject: [PATCH] fix: add missing assert --- pkgs/tools/nix/nixos-render-docs/src/tests/test_redirects.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/tools/nix/nixos-render-docs/src/tests/test_redirects.py b/pkgs/tools/nix/nixos-render-docs/src/tests/test_redirects.py index fca37c14ada948..b7bcffe1469f97 100644 --- a/pkgs/tools/nix/nixos-render-docs/src/tests/test_redirects.py +++ b/pkgs/tools/nix/nixos-render-docs/src/tests/test_redirects.py @@ -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): @@ -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)