Skip to content

Commit

Permalink
Mock mock
Browse files Browse the repository at this point in the history
  • Loading branch information
aanil committed Jan 8, 2024
1 parent ab5f2a9 commit b680759
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_ngi_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def test_get_data_with_project_unknown(data_repo_full, mocked_statusdb_conn_rows


@mock.patch("daily_read.statusdb.StatusDBSession")
def test_data_loc_not_abs():
def test_data_loc_not_abs(mock_status):
"""Test error thrown when given data location is not an absolute path"""
config_values = config.Config()
config_values.DATA_LOCATION = "tests/test_data_location"
Expand All @@ -204,7 +204,7 @@ def test_data_loc_not_abs():


@mock.patch("daily_read.statusdb.StatusDBSession")
def test_data_loc_not_dir(tmp_path):
def test_data_loc_not_dir(mock_status, tmp_path):
"""Test error thrown when data location is not a directory"""
config_values = config.Config()
temp_file = tmp_path / "test_file.txt"
Expand All @@ -213,7 +213,6 @@ def test_data_loc_not_dir(tmp_path):
with pytest.raises(
ValueError, match=f"Data Location exists but is not a directory: {config_values.DATA_LOCATION}"
) as err:
print("hi")
ngi_data.ProjectDataMaster(config_values)


Expand Down

0 comments on commit b680759

Please sign in to comment.