Merge "Use unittest.mock instead of mock"

This commit is contained in:
Zuul 2020-07-13 06:19:30 +00:00 committed by Gerrit Code Review
commit 3521af8633
5 changed files with 5 additions and 6 deletions

View File

@ -9,7 +9,6 @@
#
charm-tools>=2.4.4
requests>=2.18.4
mock>=1.2
flake8>=2.2.4,<=2.4.1
stestr>=2.2.0
coverage>=4.5.2

View File

@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from mock import patch
from unittest import mock
from unittest.mock import patch
from test_utils import CharmTestCase

View File

@ -13,7 +13,7 @@
# limitations under the License.
import json
from mock import patch
from unittest.mock import patch
import ceilometer_utils

View File

@ -14,7 +14,7 @@
import sys
from mock import MagicMock, patch
from unittest.mock import MagicMock, patch
# python-apt is not installed as part of test-requirements but is imported by
# some charmhelpers modules so create a fake import.

View File

@ -19,7 +19,7 @@ import yaml
import io
from contextlib import contextmanager
from mock import patch
from unittest.mock import patch
@contextmanager