Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2 runtimes. Since we now only support py36 and later, we can use the standard lib unittest.mock module instead. Change-Id: I453515f347a59f4c6f60e0dcba2c327cf2a40426
This commit is contained in:
parent
7ee77130c4
commit
24fc79fe24
@ -20,7 +20,6 @@ linecache2==1.0.0
|
||||
lxml==3.4.1
|
||||
MarkupSafe==1.0
|
||||
mccabe==0.2.1
|
||||
mock==2.0.0
|
||||
openstackdocstheme==2.2.1
|
||||
pbr==2.0.0
|
||||
pep8==1.5.7
|
||||
|
@ -13,6 +13,3 @@ pylint==1.7.1 # GPLv2
|
||||
reno>=3.1.0 # Apache-2.0
|
||||
openstackdocstheme>=2.2.1 # Apache-2.0
|
||||
stestr>=2.0.0 # Apache-2.0
|
||||
|
||||
# mock object framework
|
||||
mock>=2.0.0 # BSD
|
||||
|
@ -10,9 +10,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from sitemap.generator import pipelines
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
|
||||
class TestSitemapItemExporter(unittest.TestCase):
|
||||
|
@ -10,10 +10,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import scrapy
|
||||
from sitemap.generator.spiders import sitemap_file
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
|
||||
class TestSitemapItem(unittest.TestCase):
|
||||
|
Loading…
Reference in New Issue
Block a user