Skip to content

Commit

Permalink
Ignore warnings about unused mock_folio_client
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreben committed May 2, 2024
1 parent 084296f commit 2f3b35c
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions tests/data_exports/test_gobi_exports_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pymarc

from libsys_airflow.plugins.data_exports.marc import gobi as gobi_transformer
from tests.data_exports.test_marc_transformations import mock_folio_client as test_client
from tests.data_exports.test_marc_transformations import mock_folio_client # noqa


def record(**kwargs):
Expand Down Expand Up @@ -38,7 +38,7 @@ def record(**kwargs):
return record


def test_with_ebook_and_print(tmp_path, mocker, test_client):
def test_with_ebook_and_print(tmp_path, mocker, mock_folio_client): # noqa
file_date = "20240101"

folio_result = {
Expand All @@ -58,11 +58,11 @@ def test_with_ebook_and_print(tmp_path, mocker, test_client):
def mock_folio_get(*args):
return folio_result

test_client.folio_get = mock_folio_get
mock_folio_client.folio_get = mock_folio_get

mocker.patch(
'libsys_airflow.plugins.data_exports.marc.transformer.folio_client',
return_value=test_client,
return_value=mock_folio_client,
)

marc_file = tmp_path / f"{file_date}.mrc"
Expand All @@ -88,7 +88,7 @@ def mock_folio_get(*args):
assert fo.readline() == "1234567890123|ebook|325099\n"


def test_with_ebook_only(tmp_path, mocker, test_client):
def test_with_ebook_only(tmp_path, mocker, mock_folio_client): # noqa
file_date = "20240102"

folio_result = {
Expand All @@ -104,11 +104,11 @@ def test_with_ebook_only(tmp_path, mocker, test_client):
def mock_folio_get(*args):
return folio_result

test_client.folio_get = mock_folio_get
mock_folio_client.folio_get = mock_folio_get

mocker.patch(
'libsys_airflow.plugins.data_exports.marc.transformer.folio_client',
return_value=test_client,
return_value=mock_folio_client,
)

marc_file = tmp_path / f"{file_date}.mrc"
Expand All @@ -133,12 +133,12 @@ def mock_folio_get(*args):
assert fo.readline() == "1234567890123|ebook|325099\n"


def test_with_no_isbn(tmp_path, mocker, test_client):
def test_with_no_isbn(tmp_path, mocker, mock_folio_client): # noqa
file_date = "20240103.mrc"

mocker.patch(
'libsys_airflow.plugins.data_exports.marc.transformer.folio_client',
return_value=test_client,
return_value=mock_folio_client,
)

marc_file = tmp_path / f"{file_date}.mrc"
Expand All @@ -156,7 +156,7 @@ def test_with_no_isbn(tmp_path, mocker, test_client):
assert fo.readline() == ""


def test_with_print_no_electronic_holding(tmp_path, mocker, test_client):
def test_with_print_no_electronic_holding(tmp_path, mocker, mock_folio_client): # noqa
file_date = "20240104"

folio_result = {
Expand All @@ -176,11 +176,11 @@ def test_with_print_no_electronic_holding(tmp_path, mocker, test_client):
def mock_folio_get(*args):
return folio_result

test_client.folio_get = mock_folio_get
mock_folio_client.folio_get = mock_folio_get

mocker.patch(
'libsys_airflow.plugins.data_exports.marc.transformer.folio_client',
return_value=test_client,
return_value=mock_folio_client,
)

marc_file = tmp_path / f"{file_date}.mrc"
Expand All @@ -206,7 +206,7 @@ def mock_folio_get(*args):
assert fo.readline() == ""


def test_with_skipped_by_035(tmp_path, mocker, test_client):
def test_with_skipped_by_035(tmp_path, mocker, mock_folio_client): # noqa
file_date = "20240105"

folio_result = {
Expand All @@ -226,11 +226,11 @@ def test_with_skipped_by_035(tmp_path, mocker, test_client):
def mock_folio_get(*args):
return folio_result

test_client.folio_get = mock_folio_get
mock_folio_client.folio_get = mock_folio_get

mocker.patch(
'libsys_airflow.plugins.data_exports.marc.transformer.folio_client',
return_value=test_client,
return_value=mock_folio_client,
)

marc_file = tmp_path / f"{file_date}.mrc"
Expand All @@ -256,7 +256,7 @@ def mock_folio_get(*args):
assert fo.readline() == ""


def test_with_skipped_by_856(tmp_path, mocker, test_client):
def test_with_skipped_by_856(tmp_path, mocker, mock_folio_client): # noqa
file_date = "20240106"

folio_result = {
Expand All @@ -276,11 +276,11 @@ def test_with_skipped_by_856(tmp_path, mocker, test_client):
def mock_folio_get(*args):
return folio_result

test_client.folio_get = mock_folio_get
mock_folio_client.folio_get = mock_folio_get

mocker.patch(
'libsys_airflow.plugins.data_exports.marc.transformer.folio_client',
return_value=test_client,
return_value=mock_folio_client,
)

marc_file = tmp_path / f"{file_date}.mrc"
Expand All @@ -306,7 +306,7 @@ def mock_folio_get(*args):
assert fo.readline() == ""


def test_with_skipped_by_956(tmp_path, mocker, test_client):
def test_with_skipped_by_956(tmp_path, mocker, mock_folio_client): # noqa
file_date = "20240107"

folio_result = {
Expand All @@ -326,11 +326,11 @@ def test_with_skipped_by_956(tmp_path, mocker, test_client):
def mock_folio_get(*args):
return folio_result

test_client.folio_get = mock_folio_get
mock_folio_client.folio_get = mock_folio_get

mocker.patch(
'libsys_airflow.plugins.data_exports.marc.transformer.folio_client',
return_value=test_client,
return_value=mock_folio_client,
)

marc_file = tmp_path / f"{file_date}.mrc"
Expand Down

0 comments on commit 2f3b35c

Please sign in to comment.