Use unittest.mock instead of third party mock

Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I0425e8d85decf9106a533639bba1f5a4a7dc5b21
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-18 12:00:00 -05:00
parent 2c649d319e
commit 9a186fc483
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
12 changed files with 13 additions and 12 deletions

View File

@ -14,8 +14,8 @@
import shutil import shutil
import tempfile import tempfile
from unittest import mock
import mock
from oslo_config import cfg from oslo_config import cfg
import pecan import pecan
import pecan.testing import pecan.testing

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import mock from unittest import mock
from qinling.db import api as db_api from qinling.db import api as db_api
from qinling import exceptions as exc from qinling import exceptions as exc

View File

@ -15,9 +15,9 @@
from datetime import datetime from datetime import datetime
import json import json
import tempfile import tempfile
from unittest import mock
import uuid import uuid
import mock
from oslo_config import cfg from oslo_config import cfg
from qinling.db import api as db_api from qinling.db import api as db_api

View File

@ -15,8 +15,8 @@
from datetime import datetime from datetime import datetime
from datetime import timedelta from datetime import timedelta
import json import json
from unittest import mock
import mock
from qinling import context from qinling import context
from qinling.db import api as db_api from qinling.db import api as db_api

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import mock from unittest import mock
from oslo_utils import uuidutils from oslo_utils import uuidutils
from qinling.tests.unit.api import base from qinling.tests.unit.api import base

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import mock from unittest import mock
from qinling.db import api as db_api from qinling.db import api as db_api
from qinling import status from qinling import status

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import json import json
import mock from unittest import mock
from qinling import context from qinling import context
from qinling.db import api as db_api from qinling.db import api as db_api

View File

@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import mock from unittest import mock
from oslo_config import cfg from oslo_config import cfg
from qinling.db import api as db_api from qinling.db import api as db_api

View File

@ -14,9 +14,9 @@
import datetime import datetime
import testtools import testtools
from unittest import mock
import yaml import yaml
import mock
from oslo_config import cfg from oslo_config import cfg
from qinling import config from qinling import config

View File

@ -14,8 +14,8 @@
from datetime import datetime from datetime import datetime
from datetime import timedelta from datetime import timedelta
import time import time
from unittest import mock
import mock
from oslo_config import cfg from oslo_config import cfg
from qinling import context from qinling import context

View File

@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import mock
import os import os
from unittest import mock
from oslo_config import cfg from oslo_config import cfg

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import mock from unittest import mock
from swiftclient.exceptions import ClientException from swiftclient.exceptions import ClientException