diff options
author | Frederick Muriuki Muriithi | 2024-06-13 15:54:17 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-06-13 15:54:17 -0500 |
commit | 9ff12c643feadc353f29fe8dac4b9819caf1779c (patch) | |
tree | 33f8461235ade946c2ccb1e319547b938750c099 /tests/qc_app/test_progress_indication.py | |
parent | 68a43dc318fb7d76544d704752f243b9afed7e52 (diff) | |
download | gn-uploader-9ff12c643feadc353f29fe8dac4b9819caf1779c.tar.gz |
Fix tests and issues caught by tests.update-templates-for-bootstrap
Diffstat (limited to 'tests/qc_app/test_progress_indication.py')
-rw-r--r-- | tests/qc_app/test_progress_indication.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/qc_app/test_progress_indication.py b/tests/qc_app/test_progress_indication.py index 8eba970..14a1050 100644 --- a/tests/qc_app/test_progress_indication.py +++ b/tests/qc_app/test_progress_indication.py @@ -15,7 +15,7 @@ def test_with_non_existing_job(client, redis_conn_with_fresh_job): # pylint: dis assert ( b"No job, with the id '<em>non-existent-job-id</em>' was found!" in resp.data) - assert b'<meta http-equiv="refresh" content="5;url=/">' in resp.data + assert b'<meta http-equiv="refresh" content="5;url=/upload">' in resp.data def test_with_unstarted_job(client, job_id, redis_conn_with_fresh_job): # pylint: disable=[unused-argument] """ @@ -29,9 +29,9 @@ def test_with_unstarted_job(client, job_id, redis_conn_with_fresh_job): # pylint resp = client.get(f"/parse/status/{job_id}") assert b'<meta http-equiv="refresh" content="5">' in resp.data assert ( - b'<progress id="job_' + - (f'{job_id}').encode("utf8") + - b'" value="0.0">0.0</progress>') in resp.data + b'<progress id="job_' + (f'{job_id}').encode("utf8") + b'"') in resp.data + assert b'value="0.0"' in resp.data + assert b'0.0</progress>' in resp.data def test_with_in_progress_no_error_job( client, job_id, redis_conn_with_in_progress_job_no_errors): # pylint: disable=[unused-argument] @@ -48,9 +48,9 @@ def test_with_in_progress_no_error_job( resp = client.get(f"/parse/status/{job_id}") assert b'<meta http-equiv="refresh" content="5">' in resp.data assert ( - b'<progress id="job_' + - (f'{job_id}').encode("utf8") + - b'" value="0.32242342">32.242342</progress>') in resp.data + b'<progress id="job_' + (f'{job_id}').encode("utf8") + b'"') in resp.data + assert b'value="0.32242342"' in resp.data + assert b'32.242342</progress>' in resp.data assert ( b'<span >No errors found so far</span>' in resp.data) @@ -72,13 +72,13 @@ def test_with_in_progress_job_with_errors( resp = client.get(f"/parse/status/{job_id}") assert b'<meta http-equiv="refresh" content="5">' in resp.data assert ( - b'<progress id="job_' + - (f'{job_id}').encode("utf8") + - b'" value="0.4534245">45.34245</progress>') in resp.data + b'<progress id="job_' + (f'{job_id}').encode("utf8") + b'"') in resp.data + assert b'value="0.4534245"' in resp.data + assert b'45.34245</progress>' in resp.data assert ( - b'<p class="alert-error">We have found the following errors so far</p>' + b'<p class="alert-danger">We have found the following errors so far</p>' in resp.data) - assert b'table class="reports-table">' in resp.data + assert b'table class="table reports-table">' in resp.data assert b'Duplicate Header' in resp.data assert b'Invalid Value' in resp.data |