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: I6101cb044ee0fc2a7be95352569782eaf0b938aa
This commit is contained in:
jacky06 2020-04-06 11:11:01 +08:00
parent 3f9b0679ab
commit cb017ed845
13 changed files with 16 additions and 13 deletions

View File

@ -11,7 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from kolla_cli.tests.unit.common import KollaCliUnitTest

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from kolla_cli.tests.unit.common import KollaCliUnitTest

View File

@ -11,7 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from kolla_cli.tests.unit.common import KollaCliUnitTest

View File

@ -11,7 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from kolla_cli.tests.unit.common import KollaCliUnitTest

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from kolla_cli.tests.unit.common import KollaCliUnitTest

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from kolla_cli.tests.unit.common import KollaCliUnitTest

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from kolla_cli.tests.unit.common import KollaCliUnitTest

View File

@ -11,7 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from kolla_cli.tests.unit.common import KollaCliUnitTest

View File

@ -11,7 +11,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from kolla_cli.tests.unit.common import KollaCliUnitTest

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from kolla_cli.tests.unit.common import KollaCliUnitTest

View File

@ -42,7 +42,6 @@ keystoneauth1==3.4.0
linecache2==1.0.0
MarkupSafe==1.0
mccabe==0.2.1
mock==2.0.0
monotonic==1.4
mox3==0.25.0
mypy==0.6

View File

@ -11,7 +11,6 @@ bandit>=1.1.0,<1.6.0 # Apache-2.0
coverage>=4.0
doc8>=0.6.0 # Apache-2.0
fixtures>=3.0.0
mock>=2.0.0
mypy>=0.6
oslo.utils>=3.33.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0

View File

@ -70,7 +70,7 @@ commands =
[testenv:mypy]
skip_install = true
commands =
mypy --py2 --ignore-missing-imports kolla_cli
mypy --ignore-missing-imports kolla_cli
[testenv:venv]
commands = {posargs}