aboutsummaryrefslogtreecommitdiff
path: root/wqflask/tests
diff options
context:
space:
mode:
authorBonfaceKilz2020-11-03 18:11:06 +0300
committerBonfaceKilz2020-11-03 18:11:06 +0300
commit5d9b1f5d6380beaf8a2d713b5c33baa5a163b2bc (patch)
treea503b41112b8fdecf1638682182a02c82f309c55 /wqflask/tests
parent682763de47dbf15048faf302bb7f8ed524ecb27b (diff)
downloadgenenetwork2-5d9b1f5d6380beaf8a2d713b5c33baa5a163b2bc.tar.gz
Add test for "/glossary" route
Diffstat (limited to 'wqflask/tests')
-rw-r--r--wqflask/tests/integration/__init__.py0
-rw-r--r--wqflask/tests/integration/test_glossary.py28
2 files changed, 28 insertions, 0 deletions
diff --git a/wqflask/tests/integration/__init__.py b/wqflask/tests/integration/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/wqflask/tests/integration/__init__.py
diff --git a/wqflask/tests/integration/test_glossary.py b/wqflask/tests/integration/test_glossary.py
new file mode 100644
index 00000000..c9f1e62a
--- /dev/null
+++ b/wqflask/tests/integration/test_glossary.py
@@ -0,0 +1,28 @@
+"Integration tests for glossary"
+import unittest
+
+from bs4 import BeautifulSoup
+
+from wqflask import app
+
+
+class TestGenMenu(unittest.TestCase):
+ """Tests for glossary"""
+
+ def setUp(self):
+ self.app = app.test_client()
+
+ def tearDown(self):
+ pass
+
+ def test_glossary_page(self):
+ """Test that the glossary page is rendered properly"""
+ response = self.app.get('/glossary', follow_redirects=True)
+ html_content = BeautifulSoup(response.data, "lxml")
+ self.assertEqual(html_content.find("title").get_text(),
+ "Glossary GeneNetwork 2")
+ self.assertEqual(
+ html_content.find(
+ 'p',
+ attrs={'id': 'mytest'}).get_text(),
+ "Test")