Merge "Use unittest.mock instead of mock"
This commit is contained in:
commit
3521af8633
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import json
|
||||
from mock import patch
|
||||
from unittest.mock import patch
|
||||
|
||||
import ceilometer_utils
|
||||
|
||||
|
@ -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.
|
||||
|
@ -19,7 +19,7 @@ import yaml
|
||||
import io
|
||||
|
||||
from contextlib import contextmanager
|
||||
from mock import patch
|
||||
from unittest.mock import patch
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
Loading…
Reference in New Issue
Block a user