Skip to content

Commit

Permalink
Correct env patch lacking in test_save fo the testing class for Simpl…
Browse files Browse the repository at this point in the history
…eLoadData
  • Loading branch information
ChronoBoot committed Jan 5, 2024
1 parent d325789 commit ccfabb2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/tests/data_processing/test_simple_load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ def test_load(self, mock_open, mock_makedirs, mock_exists, mock_load_dotenv):
mock_open.assert_called()
mock_blob_client.download_blob().readall.assert_called()

def test_save(self):
@patch.dict('os.environ', {
'AZURE_STORAGE_CONNECTION_STRING': 'DefaultEndpointsProtocol=https;AccountName=testaccount;AccountKey=testkey;BlobEndpoint=testendpoint',
'AZURE_STORAGE_CONTAINER_NAME': 'test_container_name'
})
@patch('backend.src.data_processing.simple_load_data.load_dotenv')
def test_save(self, mock_load_dotenv):
# Arrange
simple_load_data = SimpleLoadData()

Expand Down

0 comments on commit ccfabb2

Please sign in to comment.