Use unittest.mock instead of PyPI mock
Now that py2 is gone, oslotest dropped dependency on mock and will soon affect Ussuri CI [1], let's use unittest.mock built in py3. This also fixes py38 jobs and proactively prevents py36 and py37 failing due to [1]. This is because we never included mock in test-requirements and instead relied on oslotest to bring it in. [1] https://review.opendev.org/716322 Change-Id: I0c18b13c4e1fbaa9db41da4e2039ad908c28caa6
This commit is contained in:
parent
7110477bcb
commit
611111b8bd
@ -13,10 +13,10 @@
|
||||
# under the License.
|
||||
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
import cliff.app
|
||||
import cliff.commandmanager
|
||||
import mock
|
||||
|
||||
from kayobe import ansible
|
||||
from kayobe.cli import commands
|
||||
|
@ -19,8 +19,7 @@ import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from kayobe import ansible
|
||||
from kayobe import exception
|
||||
|
@ -16,8 +16,7 @@ import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import unittest
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from kayobe import kolla_ansible
|
||||
from kayobe import utils
|
||||
|
@ -15,8 +15,8 @@
|
||||
import os
|
||||
import subprocess
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import yaml
|
||||
|
||||
from kayobe import utils
|
||||
|
@ -15,8 +15,7 @@
|
||||
import argparse
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from kayobe import utils
|
||||
from kayobe import vault
|
||||
|
@ -11,9 +11,9 @@ directives when any of the directives modules are imported.
|
||||
"""
|
||||
|
||||
import sys
|
||||
from unittest import mock
|
||||
|
||||
import doc8.main
|
||||
import mock
|
||||
import sphinx.directives
|
||||
import sphinx.directives.code
|
||||
import sphinx.directives.patches
|
||||
|
Loading…
Reference in New Issue
Block a user