Remove the dependency on the "mock" package

Now that we are python3 only, we should move to using the built
in version of mock that supports all of our testing needs and
remove the dependency on the "mock" package.

This patch moves all references to "import mock" to
"from unittest import mock". It also cleans up some new line
inconsistency.

Change-Id: Ie7567134a7c0ffae525d0282773e4c90a3f2d62b
This commit is contained in:
Michael Johnson 2020-03-13 10:33:21 -07:00
parent 7d03255181
commit c565e7b289
4 changed files with 2 additions and 6 deletions

View File

@ -2,7 +2,6 @@ bandit==1.4.0
coverage==4.0
doc8==0.6.0
hacking==0.12.0
mock==2.0.0
oslo.i18n==3.15.3
oslo.serialization==2.28.1
oslo.utils==3.33.0

View File

@ -11,8 +11,7 @@
# 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 octavia_lib.api.drivers import driver_lib
from octavia_lib.api.drivers import exceptions as driver_exceptions

View File

@ -14,8 +14,7 @@
# 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 oslotest import base

View File

@ -7,7 +7,6 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
bandit>=1.1.0 # Apache-2.0
coverage>=4.0,!=4.4 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
mock>=2.0.0 # BSD
pylint==1.9.2 # GPLv2
python-subunit>=1.0.0 # Apache-2.0/BSD
oslo.utils>=3.33.0 # Apache-2.0