Skip to content

Commit

Permalink
fixes #51: Update Mock objects to MagicMock in test_azure_storage_api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxence Guindon committed Feb 13, 2024
1 parent 922216f commit 1bc9301
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_azure_storage_api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from unittest.mock import patch, Mock
from unittest.mock import patch, Mock, MagicMock
from azure_storage.azure_storage_api import (
mount_container,
get_blob,
Expand Down Expand Up @@ -43,7 +43,7 @@ def test_mount_nonexisting_container_create(self, MockFromConnectionString):
should create a new container and return the container client
"""
# mock the client container and blob service client
mock_container_client = Mock()
mock_container_client = MagicMock()
mock_container_client.exists.return_value = False

mock_blob_service_client = MockFromConnectionString.return_value
Expand All @@ -52,7 +52,7 @@ def test_mount_nonexisting_container_create(self, MockFromConnectionString):
)

# Simulate that a new container is created
mock_new_container_client = Mock()
mock_new_container_client = MagicMock()
mock_blob_service_client.create_container.return_value = (
mock_new_container_client
)
Expand Down

0 comments on commit 1bc9301

Please sign in to comment.