UT: Remove unnecessary monkeypatch fixtures from test_pba_file_upload.py

This commit is contained in:
Mike Salvatore 2022-04-26 13:50:22 -04:00
parent fefdd9f024
commit 98033c96c0
1 changed files with 5 additions and 7 deletions

View File

@ -74,7 +74,7 @@ def flask_client(build_flask_client, file_storage_service):
@pytest.mark.parametrize("pba_os", [LINUX_PBA_TYPE, WINDOWS_PBA_TYPE])
def test_pba_file_upload_post(flask_client, pba_os, monkeypatch, mock_set_config_value):
def test_pba_file_upload_post(flask_client, pba_os, mock_set_config_value):
resp = flask_client.post(
f"/api/file-upload/{pba_os}",
data=TEST_FILE,
@ -84,7 +84,7 @@ def test_pba_file_upload_post(flask_client, pba_os, monkeypatch, mock_set_config
assert resp.status_code == 200
def test_pba_file_upload_post__invalid(flask_client, monkeypatch, mock_set_config_value):
def test_pba_file_upload_post__invalid(flask_client, mock_set_config_value):
resp = flask_client.post(
"/api/file-upload/bogus",
data=TEST_FILE,
@ -110,16 +110,14 @@ def test_pba_file_upload_post__internal_server_error(
@pytest.mark.parametrize("pba_os", [LINUX_PBA_TYPE, WINDOWS_PBA_TYPE])
def test_pba_file_upload_get__file_not_found(
flask_client, pba_os, monkeypatch, mock_get_config_value
):
def test_pba_file_upload_get__file_not_found(flask_client, pba_os, mock_get_config_value):
resp = flask_client.get(f"/api/file-upload/{pba_os}?load=bogus_mogus.py")
assert resp.status_code == 404
@pytest.mark.parametrize("pba_os", [LINUX_PBA_TYPE, WINDOWS_PBA_TYPE])
def test_pba_file_upload_endpoint(
flask_client, pba_os, monkeypatch, mock_get_config_value, mock_set_config_value
flask_client, pba_os, mock_get_config_value, mock_set_config_value
):
resp_post = flask_client.post(
f"/api/file-upload/{pba_os}",
@ -146,7 +144,7 @@ def test_pba_file_upload_endpoint(
def test_pba_file_upload_endpoint__invalid(
flask_client, monkeypatch, mock_set_config_value, mock_get_config_value
flask_client, mock_set_config_value, mock_get_config_value
):
resp_post = flask_client.post(
"/api/file-upload/bogus",