From 2f3f19e2dcf885d9e083eb7de46f0526da1d9e11 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Tue, 15 Feb 2022 21:50:21 +0000 Subject: [PATCH] Use unittest.mock instead of third party mock Closes: #1177 --- gnocchi/tests/indexer/sqlalchemy/test_migrations.py | 2 +- gnocchi/tests/test_aggregates.py | 2 +- gnocchi/tests/test_amqp1d.py | 2 +- gnocchi/tests/test_indexer.py | 2 +- gnocchi/tests/test_rest.py | 2 +- gnocchi/tests/test_statsd.py | 2 +- gnocchi/tests/test_storage.py | 2 +- gnocchi/tests/test_utils.py | 2 +- setup.cfg | 1 - 9 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gnocchi/tests/indexer/sqlalchemy/test_migrations.py b/gnocchi/tests/indexer/sqlalchemy/test_migrations.py index 237123475..e3de27131 100644 --- a/gnocchi/tests/indexer/sqlalchemy/test_migrations.py +++ b/gnocchi/tests/indexer/sqlalchemy/test_migrations.py @@ -15,12 +15,12 @@ import abc import fixtures -import mock import oslo_db.exception from oslo_db.sqlalchemy import test_migrations import six import sqlalchemy.schema import sqlalchemy_utils +from unittest import mock from gnocchi import indexer from gnocchi.indexer import sqlalchemy diff --git a/gnocchi/tests/test_aggregates.py b/gnocchi/tests/test_aggregates.py index 47de657e1..ee649addb 100644 --- a/gnocchi/tests/test_aggregates.py +++ b/gnocchi/tests/test_aggregates.py @@ -17,8 +17,8 @@ import functools import uuid -import mock import numpy +from unittest import mock from gnocchi import carbonara from gnocchi import incoming diff --git a/gnocchi/tests/test_amqp1d.py b/gnocchi/tests/test_amqp1d.py index 527e39844..7a24b5b6e 100644 --- a/gnocchi/tests/test_amqp1d.py +++ b/gnocchi/tests/test_amqp1d.py @@ -14,8 +14,8 @@ import json import uuid -import mock import numpy +from unittest import mock from gnocchi import amqp1d from gnocchi.tests import base as tests_base diff --git a/gnocchi/tests/test_indexer.py b/gnocchi/tests/test_indexer.py index ec77ac424..cbc04e078 100644 --- a/gnocchi/tests/test_indexer.py +++ b/gnocchi/tests/test_indexer.py @@ -17,8 +17,8 @@ import operator import uuid -import mock import numpy +from unittest import mock from gnocchi import archive_policy from gnocchi import indexer diff --git a/gnocchi/tests/test_rest.py b/gnocchi/tests/test_rest.py index 51b397c86..392732980 100644 --- a/gnocchi/tests/test_rest.py +++ b/gnocchi/tests/test_rest.py @@ -26,10 +26,10 @@ import fixtures import iso8601 from keystonemiddleware import fixture as ksm_fixture -import mock import six import testscenarios from testtools import testcase +from unittest import mock import webtest import gnocchi diff --git a/gnocchi/tests/test_statsd.py b/gnocchi/tests/test_statsd.py index ce6c52c4e..9ea940b86 100644 --- a/gnocchi/tests/test_statsd.py +++ b/gnocchi/tests/test_statsd.py @@ -17,8 +17,8 @@ import datetime import uuid -import mock import numpy +from unittest import mock from gnocchi import indexer from gnocchi import statsd diff --git a/gnocchi/tests/test_storage.py b/gnocchi/tests/test_storage.py index 753cf4cfc..0d9238cec 100644 --- a/gnocchi/tests/test_storage.py +++ b/gnocchi/tests/test_storage.py @@ -16,9 +16,9 @@ import datetime import uuid -import mock import numpy import six.moves +from unittest import mock from gnocchi import archive_policy from gnocchi import carbonara diff --git a/gnocchi/tests/test_utils.py b/gnocchi/tests/test_utils.py index 50856a8b7..59fa8218e 100644 --- a/gnocchi/tests/test_utils.py +++ b/gnocchi/tests/test_utils.py @@ -17,7 +17,7 @@ import uuid import iso8601 -import mock +from unittest import mock from gnocchi import storage from gnocchi.tests import base as tests_base diff --git a/setup.cfg b/setup.cfg index da0090874..15a4b0e1d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -95,7 +95,6 @@ test = gabbi>=1.37.0 coverage>=3.6 fixtures - mock python-subunit>=0.0.18 os-testr testrepository