From 9ff12c643feadc353f29fe8dac4b9819caf1779c Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 13 Jun 2024 15:54:17 -0500 Subject: Fix tests and issues caught by tests. --- qc_app/entry.py | 7 +-- qc_app/templates/index.html | 8 +-- tests/qc_app/test_entry.py | 97 +++++++++-------------------- tests/qc_app/test_parse.py | 6 +- tests/qc_app/test_progress_indication.py | 24 +++---- tests/qc_app/test_results_page.py | 6 +- tests/qc_app/test_uploads_with_zip_files.py | 49 +++++++++++---- 7 files changed, 91 insertions(+), 106 deletions(-) diff --git a/qc_app/entry.py b/qc_app/entry.py index d23a45a..f2db878 100644 --- a/qc_app/entry.py +++ b/qc_app/entry.py @@ -100,7 +100,7 @@ def upload_file(): request_errors = errors(request) if request_errors: for error in request_errors: - flash(error, "alert-error error-expr-data") + flash(error, "alert-danger error-expr-data") return redirect(url_for("entry.upload_file")) filename = secure_filename(request.files["qc_text_file"].filename) @@ -113,9 +113,8 @@ def upload_file(): zip_errors = zip_file_errors(filepath, upload_dir) if zip_errors: for error in zip_errors: - flash(error, "alert-error error-expr-data") - return render_template( - "index.html", species=with_db_connection(species)), 400 + flash(error, "alert-danger error-expr-data") + return redirect(url_for("entry.upload_file")) return redirect(url_for("parse.parse", speciesid=request.form["speciesid"], diff --git a/qc_app/templates/index.html b/qc_app/templates/index.html index 997c1e5..e23dde1 100644 --- a/qc_app/templates/index.html +++ b/qc_app/templates/index.html @@ -26,7 +26,7 @@
The R/qtl2 bundle, additionally, can contain extra metadata, that neither of the methods below can handle.
This section gives you the opportunity to upload any missing samples
We have found the following errors so far
We found the following errors