Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{Packaging} Drop mock library #3754

Merged
merged 2 commits into from
Aug 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/ci/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import shlex
from subprocess import check_output, check_call, CalledProcessError

import mock
from unittest import mock
from wheel.install import WHEEL_INFO_RE
from six import with_metaclass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import json
import unittest
import mock
from unittest import mock
import requests

from azure_devtools.scenario_tests import AllowLargeResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,7 @@ def test_aks_create_fqdn_subdomain(self, resource_group, resource_group_location
})

# assign
import mock
from unittest import mock
with mock.patch('azure.cli.command_modules.role.custom._gen_guid', side_effect=self.create_guid):
assignment = self.cmd(
'role assignment create --assignee-object-id={identity_id} --role "Private DNS Zone Contributor" --scope={zone_id} --assignee-principal-type ServicePrincipal').get_output_in_json()
Expand Down
2 changes: 1 addition & 1 deletion src/alias/azext_alias/tests/test_alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import sys
import shlex
import unittest
from mock import Mock, patch
from unittest.mock import Mock, patch
from six.moves import configparser

from knack.util import CLIError
Expand Down
2 changes: 1 addition & 1 deletion src/alias/azext_alias/tests/test_alias_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import shutil
import tempfile
import unittest
import mock
from unittest import mock

from azure.cli.testsdk import ScenarioTest
from azext_alias import alias
Expand Down
2 changes: 1 addition & 1 deletion src/alias/azext_alias/tests/test_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# pylint: disable=line-too-long,no-self-use,protected-access

import unittest
from mock import Mock, patch
from unittest.mock import Mock, patch

from knack.util import CLIError

Expand Down
2 changes: 1 addition & 1 deletion src/alias/azext_alias/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import shutil
import tempfile
import unittest
import mock
from unittest import mock

from azext_alias.util import remove_pos_arg_placeholders, build_tab_completion_table, get_config_parser
from azext_alias._const import ALIAS_TAB_COMP_TABLE_FILE_NAME
Expand Down
2 changes: 1 addition & 1 deletion src/alias/azext_alias/tests/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import sys
import tempfile
import unittest
from mock import patch
from unittest.mock import patch

from knack.util import CLIError

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# --------------------------------------------------------------------------

import os
import mock
from unittest import mock
import tempfile
from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_blueprint(self, resource_group):
'--change-notes "First release"',
checks=[])

import mock
from unittest import mock
with mock.patch('azure.cli.command_modules.role.custom._gen_guid', side_effect=self.create_guid):
assignment = self.cmd(
'az blueprint assignment create '
Expand Down Expand Up @@ -215,7 +215,7 @@ def test_blueprint_import(self, resource_group):
'--version "1.0" '
'--change-notes "First release"',
checks=[JMESPathCheck('name', '1.0')])
import mock
from unittest import mock
with mock.patch('azure.cli.command_modules.role.custom._gen_guid', side_effect=self.create_guid):
assignment = self.cmd(
'az blueprint assignment create '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# --------------------------------------------------------------------------

import jwt
import mock
from unittest import mock
import os
import azure.cli.command_modules.role.custom
from azure.cli.testsdk import ScenarioTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# regenerated.
# --------------------------------------------------------------------------

import mock
from unittest import mock
import time

from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# --------------------------------------------------------------------------------------------

import os
import mock
from unittest import mock

from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer)
from azure_devtools.scenario_tests import AllowLargeResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# --------------------------------------------------------------------------

import os
import mock
from unittest import mock
from azure.cli.testsdk import ScenarioTest
from azure.cli.testsdk import ResourceGroupPreparer
from azure_devtools.scenario_tests import AllowLargeResponse
Expand Down
2 changes: 1 addition & 1 deletion src/db-up/azext_db_up/tests/latest/test_db_up_scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

import mock
from unittest import mock
import psycopg2
import mysql.connector
from azure.cli.testsdk import (ScenarioTest, JMESPathCheck, ResourceGroupPreparer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
import mock
from unittest import mock
from azure.cli.testsdk import ScenarioTest
from azure.cli.testsdk import ResourceGroupPreparer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# --------------------------------------------------------------------------------------------

import os
import mock
from unittest import mock

from azure_devtools.scenario_tests import AllowLargeResponse
from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import os
import unittest
import mock
from unittest import mock

from azure.cli.core.mock import DummyCli
from azext_interactive.azclishell.configuration import Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import six
import os
import json
import mock
from unittest import mock
from azext_interactive.azclishell.util import parse_quotes
from azext_interactive.azclishell.gather_commands import GatherCommands

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import os
import unittest
import mock
from unittest import mock

from azure.cli.core.mock import DummyCli
from azext_interactive.azclishell.configuration import Configuration
Expand Down
Loading