Merge "Use unittest.mock instead of mock"
This commit is contained in:
commit
2e3245716e
@ -14,8 +14,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import mock
|
|
||||||
from webob import exc
|
from webob import exc
|
||||||
|
|
||||||
from ironic.api.controllers import base as cbase
|
from ironic.api.controllers import base as cbase
|
||||||
|
@ -15,10 +15,10 @@ Tests for the API /allocations/ methods.
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
|
from unittest import mock
|
||||||
from urllib import parse as urlparse
|
from urllib import parse as urlparse
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
import mock
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
@ -17,9 +17,9 @@ Tests for the API /chassis/ methods.
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
|
from unittest import mock
|
||||||
from urllib import parse as urlparse
|
from urllib import parse as urlparse
|
||||||
|
|
||||||
import mock
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
@ -15,8 +15,8 @@ Tests for the API /conductors/ methods.
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import mock
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
@ -15,9 +15,9 @@ Tests for the API /deploy_templates/ methods.
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
|
from unittest import mock
|
||||||
from urllib import parse as urlparse
|
from urllib import parse as urlparse
|
||||||
|
|
||||||
import mock
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
import json
|
import json
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import mock
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from testtools import matchers
|
from testtools import matchers
|
||||||
|
|
||||||
|
@ -14,8 +14,7 @@ Tests for the API /events methods.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
|
from unittest import mock
|
||||||
import mock
|
|
||||||
|
|
||||||
from ironic.api.controllers import base as api_base
|
from ironic.api.controllers import base as api_base
|
||||||
from ironic.api.controllers.v1 import types
|
from ironic.api.controllers.v1 import types
|
||||||
|
@ -19,8 +19,8 @@ import inspect
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import mock
|
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
import pecan.rest
|
import pecan.rest
|
||||||
import pecan.testing
|
import pecan.testing
|
||||||
|
@ -17,10 +17,10 @@ import datetime
|
|||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
from unittest import mock
|
||||||
from urllib import parse as urlparse
|
from urllib import parse as urlparse
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
import mock
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
|
|
||||||
"""Test class for ironic-api notification utilities."""
|
"""Test class for ironic-api notification utilities."""
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
|
||||||
from ironic.api.controllers.v1 import notification_utils as notif_utils
|
from ironic.api.controllers.v1 import notification_utils as notif_utils
|
||||||
|
@ -16,9 +16,9 @@ Tests for the API /ports/ methods.
|
|||||||
import datetime
|
import datetime
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
import types
|
import types
|
||||||
|
from unittest import mock
|
||||||
from urllib import parse as urlparse
|
from urllib import parse as urlparse
|
||||||
|
|
||||||
import mock
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
@ -15,9 +15,9 @@ Tests for the API /portgroups/ methods.
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
|
from unittest import mock
|
||||||
from urllib import parse as urlparse
|
from urllib import parse as urlparse
|
||||||
|
|
||||||
import mock
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
@ -16,9 +16,9 @@ Tests for the API /lookup/ methods.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
import mock
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from webob import exc as webob_exc
|
from webob import exc as webob_exc
|
||||||
|
|
||||||
from ironic.api.controllers import v1 as v1_api
|
from ironic.api.controllers import v1 as v1_api
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
import platform
|
import platform
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import mock
|
|
||||||
from pecan import rest
|
from pecan import rest
|
||||||
|
|
||||||
from ironic.api.controllers.v1 import types
|
from ironic.api.controllers.v1 import types
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import mock
|
|
||||||
import os_traits
|
import os_traits
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
@ -16,8 +16,7 @@ Tests for the versions constants and methods.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
from unittest import mock
|
||||||
import mock
|
|
||||||
|
|
||||||
from ironic.api.controllers.v1 import versions
|
from ironic.api.controllers.v1 import versions
|
||||||
from ironic.common import release_mappings
|
from ironic.common import release_mappings
|
||||||
|
@ -17,9 +17,9 @@ Tests for the API /volume connectors/ methods.
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
|
from unittest import mock
|
||||||
from urllib import parse as urlparse
|
from urllib import parse as urlparse
|
||||||
|
|
||||||
import mock
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
@ -17,9 +17,9 @@ Tests for the API /volume targets/ methods.
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
from http import client as http_client
|
from http import client as http_client
|
||||||
|
from unittest import mock
|
||||||
from urllib import parse as urlparse
|
from urllib import parse as urlparse
|
||||||
|
|
||||||
import mock
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
@ -50,7 +50,6 @@ logutils==0.3.5
|
|||||||
Mako==1.1.2
|
Mako==1.1.2
|
||||||
MarkupSafe==1.1.1
|
MarkupSafe==1.1.1
|
||||||
mccabe==0.6.1
|
mccabe==0.6.1
|
||||||
mock==4.0.2
|
|
||||||
monotonic==1.5
|
monotonic==1.5
|
||||||
mox3==1.0.0
|
mox3==1.0.0
|
||||||
msgpack-python==0.5.6
|
msgpack-python==0.5.6
|
||||||
|
Loading…
Reference in New Issue
Block a user