about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBonfaceKilz2020-11-20 20:00:29 +0300
committerBonfaceKilz2020-11-20 20:00:29 +0300
commite323c52889cfbab7f152e4969f6e2b528768587a (patch)
treea89411b5b555f15d589bbb79822513e7eddadd01
parent0a6a5d0ac847489bb5db158bc54e73aa682e18a0 (diff)
downloadgenenetwork2-e323c52889cfbab7f152e4969f6e2b528768587a.tar.gz
Update tests to use new gn2-docs url
-rw-r--r--wqflask/tests/unit/wqflask/test_markdown_routes.py24
1 files 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("""<h1>Glossary</h1>
 <p>This is some content</p>
 <h2>Sub-heading</h2>
-<p>This is another sub-heading</p>
-""",
+<p>This is another sub-heading</p>""",
                          markdown_content)