forked from pool/python-kafka-python
- Add patch remove-mock.patch:
* Remove use of mock. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-kafka-python?expand=0&rev=23
This commit is contained in:
16
remove-mock.patch
Normal file
16
remove-mock.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
Index: kafka-python-2.0.2/test/test_consumer_integration.py
|
||||
===================================================================
|
||||
--- kafka-python-2.0.2.orig/test/test_consumer_integration.py
|
||||
+++ kafka-python-2.0.2/test/test_consumer_integration.py
|
||||
@@ -1,7 +1,10 @@
|
||||
import logging
|
||||
import time
|
||||
|
||||
-from mock import patch
|
||||
+try:
|
||||
+ from unittest.mock import patch
|
||||
+except ImportError:
|
||||
+ from mock import patch
|
||||
import pytest
|
||||
from kafka.vendor.six.moves import range
|
||||
|
||||
Reference in New Issue
Block a user