Skip to content

Commit

Permalink
Use unittest.mock instead of third party mock
Browse files Browse the repository at this point in the history
Closes: #1177
  • Loading branch information
tobias-urdin committed Feb 15, 2022
1 parent 1207c4a commit ff7a185
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gnocchi/tests/indexer/sqlalchemy/test_migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gnocchi/tests/test_aggregates.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import functools
import uuid

import mock
import numpy
from unittest import mock

from gnocchi import carbonara
from gnocchi import incoming
Expand Down
2 changes: 1 addition & 1 deletion gnocchi/tests/test_amqp1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gnocchi/tests/test_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gnocchi/tests/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gnocchi/tests/test_statsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import datetime
import uuid

import mock
import numpy
from unittest import mock

from gnocchi import indexer
from gnocchi import statsd
Expand Down
2 changes: 1 addition & 1 deletion gnocchi/tests/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gnocchi/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ test =
gabbi>=1.37.0
coverage>=3.6
fixtures
mock
python-subunit>=0.0.18
os-testr
testrepository
Expand Down

0 comments on commit ff7a185

Please sign in to comment.