Skip to content

Commit

Permalink
changing driver whereabouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Lydersen committed Oct 19, 2023
1 parent 0ed1024 commit ade0b57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_dwh.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def mock_connect(self):
pass

monkeypatch.setattr(
"database_operations.DWH.connect_to_database_using_pyodbc", mock_connect
"pyprediktormapclient.dwh.DWH.connect_to_database_using_pyodbc", mock_connect
)

dwh = DWH(grs(), grs(), grs(), grs())
Expand All @@ -22,7 +22,7 @@ def mock_connect(self):

def test_connect_to_database_using_pyodbc_no_drivers(monkeypatch):
# Mock the absence of ODBC drivers
monkeypatch.setattr("database_operations.pyodbc.drivers", lambda: [])
monkeypatch.setattr("pyprediktormapclient.dwh.pyodbc.drivers", lambda: [])

# Test failure scenario when no ODBC drivers are available
with pytest.raises(ValueError) as excinfo:
Expand Down

0 comments on commit ade0b57

Please sign in to comment.