From e323c52889cfbab7f152e4969f6e2b528768587a Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Fri, 20 Nov 2020 20:00:29 +0300 Subject: Update tests to use new gn2-docs url --- wqflask/tests/unit/wqflask/test_markdown_routes.py | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/wqflask/tests/unit/wqflask/test_markdown_routes.py b/wqflask/tests/unit/wqflask/test_markdown_routes.py index 3adf63e5..2d403d04 100644 --- a/wqflask/tests/unit/wqflask/test_markdown_routes.py +++ b/wqflask/tests/unit/wqflask/test_markdown_routes.py @@ -23,8 +23,7 @@ class MockRequests200: This is some content ## Sub-heading -This is another sub-heading - """ +This is another sub-heading""" class TestMarkdownRoutesFunctions(unittest.TestCase): """Test cases for functions in markdown_routes""" @@ -32,27 +31,26 @@ class TestMarkdownRoutesFunctions(unittest.TestCase): @mock.patch('wqflask.markdown_routes.requests.get') def test_render_markdown_when_fetching_locally(self, requests_mock): requests_mock.return_value = MockRequests404() - markdown_content = render_markdown("glossary.md") + markdown_content = render_markdown("general/glossary/glossary.md") requests_mock.assert_called_with( "https://raw.githubusercontent.com" - "/genenetwork/genenetwork2/" - "wqflask/wqflask/static/" - "glossary.md") + "/genenetwork/gn-docs/" + "master/general/" + "glossary/glossary.md") self.assertRegexpMatches(markdown_content, - "Glossary of Terms and Features") + "Content for general/glossary/glossary.md not available.") @mock.patch('wqflask.markdown_routes.requests.get') def test_render_markdown_when_fetching_remotely(self, requests_mock): requests_mock.return_value = MockRequests200() - markdown_content = render_markdown("glossary.md") + markdown_content = render_markdown("general/glossary/glossary.md") requests_mock.assert_called_with( "https://raw.githubusercontent.com" - "/genenetwork/genenetwork2/" - "wqflask/wqflask/static/" - "glossary.md") + "/genenetwork/gn-docs/" + "master/general/" + "glossary/glossary.md") self.assertEqual("""
This is some content
This is another sub-heading
-""", +This is another sub-heading
""", markdown_content) -- cgit v1.2.3