aboutsummaryrefslogtreecommitdiff
path: root/tests/qc_app/test_entry.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-10-17 10:26:15 -0500
committerFrederick Muriuki Muriithi2024-10-17 11:32:28 -0500
commit85215361b561d332cab954ea68438a2d442c96d8 (patch)
tree90a3115843770f5e3806762695223a7115a71d99 /tests/qc_app/test_entry.py
parent9db2d0986619bf801e2308ee55e4340d9f050376 (diff)
downloadgn-uploader-85215361b561d332cab954ea68438a2d442c96d8.tar.gz
Rename test module.
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)