Skip to content

Commit

Permalink
fix env files and cleanup a test as per MR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
IMladjenovic committed Nov 12, 2024
1 parent 3ddb47c commit 5f20c45
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 0 additions & 2 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ neo4j==5.18.0
ruff==0.3.5
jinja2==3.1.3
websockets==12.0
azure-core==1.30.1
azure-storage-blob==12.20.0
cffi==1.16.0
cryptography==42.0.7
isodate==0.6.1
Expand Down
17 changes: 1 addition & 16 deletions backend/tests/api/app_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,6 @@
expected_message = "Hello to you too! From InferESG"


@pytest.fixture
def mock_initial_data(mocker):
blob_service_client = mocker.patch("src.api.app.BlobServiceClient", return_value=mocker.Mock())
container_client = mocker.Mock()
blob_service_client.get_container_client.return_value = container_client
blob_client = mocker.Mock()
container_client.get_blob_client.return_value = blob_client
download_stream = mocker.Mock()
blob_client.download_blob.return_value = download_stream
mock_data = mocker.Mock()
mocker.patch("src.api.app.json.loads", return_value=mock_data)

return mock_data


def test_health_check_response_healthy(mocker):
mock_test_connection = mocker.patch("src.api.app.test_connection", return_value=True)

Expand Down Expand Up @@ -64,7 +49,7 @@ def test_chat_response_failure(mocker):


@pytest.mark.asyncio
async def test_lifespan_populates_db(mocker, mock_initial_data) -> None:
async def test_lifespan_populates_db(mocker) -> None:
mock_dataset_upload = mocker.patch("src.api.app.dataset_upload", return_value=mocker.Mock())

with client:
Expand Down

0 comments on commit 5f20c45

Please sign in to comment.