diff options
author | Frederick Muriuki Muriithi | 2022-06-21 10:21:26 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-06-21 10:21:26 +0300 |
commit | df0ccad74fa18d43b23cabe45a9bf268459e4151 (patch) | |
tree | ae5ff399eee8ecb530b5f575b99f7a34df17c479 /tests/qc_app | |
parent | 69f71b1ed9b1be832af661e0d11d8bd54a696d10 (diff) | |
download | gn-uploader-df0ccad74fa18d43b23cabe45a9bf268459e4151.tar.gz |
Rename fixture: fixture gives back the redis url, not a server
Diffstat (limited to 'tests/qc_app')
-rw-r--r-- | tests/qc_app/test_parse.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/qc_app/test_parse.py b/tests/qc_app/test_parse.py index b7bf938..46b45d9 100644 --- a/tests/qc_app/test_parse.py +++ b/tests/qc_app/test_parse.py @@ -10,7 +10,7 @@ def module_uuid4(): "module patch for the `uuid.uuid4()` function" return "934c55d8-396e-4959-90e1-2698e9205758" -def test_parse_with_existing_uploaded_file(client, redis_server, monkeypatch): +def test_parse_with_existing_uploaded_file(client, redis_url, monkeypatch): """ GIVEN: 1. A flask application testing client 2. A valid file, and filetype @@ -33,14 +33,14 @@ def test_parse_with_existing_uploaded_file(client, redis_server, monkeypatch): assert b'Redirecting...' in resp.data assert b'/parse/status/934c55d8-396e-4959-90e1-2698e9205758' in resp.data - with redis.Redis.from_url(redis_server, decode_responses=True) as rconn: + with redis.Redis.from_url(redis_url, decode_responses=True) as rconn: the_job = job(rconn, module_uuid4()) assert the_job["job_id"] == module_uuid4() assert the_job["filename"] == filename assert the_job["command"] == " ".join([ "python3", "-m", "scripts.worker", filetype, - f"{client.application.config['UPLOAD_FOLDER']}/{filename}", redis_server, + f"{client.application.config['UPLOAD_FOLDER']}/{filename}", redis_url, module_uuid4()]) @pytest.mark.parametrize( |