Browse Source

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>
changes/08/721008/1 4.0.0
Sean McGinnis 10 months ago
parent
commit
9a186fc483
No known key found for this signature in database GPG Key ID: CE7EE4BFAF8D70C8
12 changed files with 13 additions and 12 deletions
  1. +1
    -1
      qinling/tests/unit/api/base.py
  2. +1
    -1
      qinling/tests/unit/api/controllers/v1/test_execution.py
  3. +1
    -1
      qinling/tests/unit/api/controllers/v1/test_function.py
  4. +1
    -1
      qinling/tests/unit/api/controllers/v1/test_function_version.py
  5. +1
    -1
      qinling/tests/unit/api/controllers/v1/test_function_worker.py
  6. +1
    -1
      qinling/tests/unit/api/controllers/v1/test_runtime.py
  7. +1
    -1
      qinling/tests/unit/api/controllers/v1/test_webhook.py
  8. +2
    -1
      qinling/tests/unit/engine/test_default_engine.py
  9. +1
    -1
      qinling/tests/unit/orchestrator/kubernetes/test_manager.py
  10. +1
    -1
      qinling/tests/unit/services/test_periodics.py
  11. +1
    -1
      qinling/tests/unit/storage/test_file_system.py
  12. +1
    -1
      qinling/tests/unit/utils/openstack/test_swift.py

+ 1
- 1
qinling/tests/unit/api/base.py View File

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


+ 1
- 1
qinling/tests/unit/api/controllers/v1/test_execution.py View File

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


+ 1
- 1
qinling/tests/unit/api/controllers/v1/test_function.py View File

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


+ 1
- 1
qinling/tests/unit/api/controllers/v1/test_function_version.py View File

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


+ 1
- 1
qinling/tests/unit/api/controllers/v1/test_function_worker.py View File

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


+ 1
- 1
qinling/tests/unit/api/controllers/v1/test_runtime.py View File

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


+ 1
- 1
qinling/tests/unit/api/controllers/v1/test_webhook.py View File

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


+ 2
- 1
qinling/tests/unit/engine/test_default_engine.py View File

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


+ 1
- 1
qinling/tests/unit/orchestrator/kubernetes/test_manager.py View File

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


+ 1
- 1
qinling/tests/unit/services/test_periodics.py View File

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


+ 1
- 1
qinling/tests/unit/storage/test_file_system.py View File

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


+ 1
- 1
qinling/tests/unit/utils/openstack/test_swift.py View File

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


Loading…
Cancel
Save