From 6760d322637a3d875242a66e9c1a784866d7df1d Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 15 Jun 2022 08:05:11 +0300 Subject: Setup test fixtures and initial tests for web-UI --- tests/qc_app/test_parse.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/qc_app/test_parse.py (limited to 'tests/qc_app/test_parse.py') diff --git a/tests/qc_app/test_parse.py b/tests/qc_app/test_parse.py new file mode 100644 index 0000000..41d2c26 --- /dev/null +++ b/tests/qc_app/test_parse.py @@ -0,0 +1,12 @@ +import pytest + +def test_parse_with_existing_file(client, monkeypatch): + monkeypatch.setattr( + "qc_app.jobs.uuid4", lambda : "934c55d8-396e-4959-90e1-2698e9205758") + resp = client.get( + "/parse/parse?filename=no_data_errors.tsv&filetype=average") + print(resp.status) + print(resp.data) + assert resp.status_code == 302 + assert b'Redirecting...' in resp.data + assert b'/parse/status/934c55d8-396e-4959-90e1-2698e9205758' in resp.data -- cgit v1.2.3