aboutsummaryrefslogtreecommitdiff
path: root/tests/qc_app/test_entry.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qc_app/test_entry.py')
-rw-r--r--tests/qc_app/test_entry.py43
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/qc_app/test_entry.py b/tests/qc_app/test_entry.py
deleted file mode 100644
index 0c614a5..0000000
--- a/tests/qc_app/test_entry.py
+++ /dev/null
@@ -1,43 +0,0 @@
-"""Test the entry module in the web-ui"""
-import pytest
-
-@pytest.mark.parametrize(
- "dataitem,lower",
- (
- # expression data UI elements
- (b'<h2 class="heading">expression data</h2>', True),
- (b'<a href="/upload"', False),
- (b'upload expression data</a>', False),
-
- # samples/cases data UI elements
- (b'<h2 class="heading">samples/cases</h2>', True),
- (b'<a href="/samples/upload/species"', False),
- (b'upload samples/cases', True),
-
- # R/qtl2 data UI elements
- (b'<h2 class="heading">r/qtl2 bundles</h2>', True),
- (b'<a href="/upload/rqtl2/select-species"', False),
- (b'upload r/qtl2 bundle', True)
- ))
-def test_landing_page_has_sections(client, dataitem, lower):
- """
- GIVEN: A flask application testing client
- WHEN: the index page is requested
- THEN: ensure the page has the expected UI elements
- """
- resp = client.get("/")
- assert resp.status_code == 200
- assert dataitem in (resp.data.lower() if lower else resp.data)
-
-
-def test_landing_page_fails_with_post(client):
- """
- GIVEN: A flask application testing client
- WHEN: the index page is requested with the "POST" method
- THEN: ensure the system fails
- """
- resp = client.post("/")
- assert resp.status_code == 405
- assert (
- b'<h1>405: The method is not allowed for the requested URL.</h1>'
- in resp.data)