Fix mocker usage

This commit is contained in:
Luke Murphy 2019-12-04 22:49:09 +07:00
parent 05b5b27906
commit 2987cac885
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -3,7 +3,6 @@
def test_version_fails_gracefully(mocker):
target = 'pkg_resources.get_distribution'
with mocker.patch(target, side_effect=Exception()):
from merkle_tree_stream.__init__ import __version__
assert __version__ == 'unknown'
mocker.patch(target, side_effect=Exception())
from merkle_tree_stream.__init__ import __version__
assert __version__ == 'unknown'