Commit dee7e83f by Karsa Zoltán István

mock replace

parent 7c548bc4
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License along
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
from mock import patch
from unittest.mock import patch
class MockCeleryMixin(object):
......
......@@ -18,7 +18,7 @@
from collections import deque
from django.test import TestCase
from mock import MagicMock
from unittest.mock import MagicMock
from .celery_mock import MockCeleryMixin
from .models import TestClass
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License along
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
from mock import MagicMock, patch
from unittest.mock import MagicMock, patch
from django.test import TestCase
......
......@@ -19,7 +19,7 @@ import unittest
import warnings
from factory import Factory, Sequence
from mock import patch, MagicMock
from unittest.mock import patch, MagicMock
from django.contrib.auth.models import User, AnonymousUser
from django.core.exceptions import PermissionDenied
......
......@@ -16,7 +16,7 @@
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
import unittest
from mock import patch, MagicMock
from unittest.mock import patch, MagicMock
from django.contrib.auth.models import User
......
......@@ -33,7 +33,7 @@ from circle.vm.operations import (WakeUpOperation, AddInterfaceOperation,
DeployOperation, RenameOperation)
from ..models import Profile
from circle.firewall.models import Vlan, Host, VlanGroup
from mock import Mock, patch
from unittest.mock import Mock, patch
from simplesshkey.models import UserKey
import django.conf
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License along
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
from mock import patch
from unittest.mock import patch
from netaddr import IPSet, AddrFormatError
import django.conf
......
......@@ -18,7 +18,7 @@
from django.test import TestCase
from django.test.client import Client
from django.contrib.auth.models import User, Group
from mock import Mock
from unittest.mock import Mock
from common.tests.celery_mock import MockCeleryMixin
from dashboard.tests.test_views import LoginMixin
......
......@@ -19,7 +19,7 @@ from django.test import TestCase
from django.test.client import Client
from django.contrib.auth.models import User, Permission
from mock import Mock, patch
from unittest.mock import Mock, patch
from common.tests.celery_mock import MockCeleryMixin
......
......@@ -19,7 +19,7 @@ from datetime import timedelta
from django.test import TestCase
from django.utils import timezone
from mock import MagicMock
from unittest.mock import MagicMock
from ..models import Disk, DataStore
......
......@@ -16,7 +16,7 @@
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
from datetime import datetime
from mock import Mock, MagicMock, patch, call
from unittest.mock import Mock, MagicMock, patch, call
import types
from celery.contrib.abortable import AbortableAsyncResult
......
......@@ -16,7 +16,7 @@
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
from django.test import TestCase
from mock import MagicMock
from unittest.mock import MagicMock
from common.operations import operation_registry_name as op_reg_name
from vm.models import Instance, InstanceActivity, Node
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment