Move `set_up_kafka` & `clean_kafka` functions to `pytest_kafka/utils.py`
- Move
set_up_kafka
&clean_kafka
functions topytest_kafka/utils.py
- Allow overriding default url, and extraction locations
- Allow optional overriding of default location of
KAFKA_SCRIPTS
intest_pytest_kafka.py
by setting aKAFKA_SCRIPTS
environment variable.
I tested this with:
python setup.py install
mkdir -p /tmp/test
python -c "from pytest_kafka import utils; utils.set_up_kafka(extract_location='/tmp/test')"
KAFKA_SCRIPTS=/tmp/test/kafka/bin pytest test_pytest_kafka.py
Let me know if there are any changes you would like me to make.
fixes #9 (closed)