From 57ad0fe7295a09c10454f0b07857f7f6a3bb79b3 Mon Sep 17 00:00:00 2001 From: Saleem Rashid Date: Tue, 19 Dec 2017 09:11:35 +0000 Subject: [PATCH] unit_tests: Fix tx_api.cache_dir --- tests/unit_tests/test_tx_api.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/unit_tests/test_tx_api.py b/tests/unit_tests/test_tx_api.py index 9e08540..4002349 100644 --- a/tests/unit_tests/test_tx_api.py +++ b/tests/unit_tests/test_tx_api.py @@ -16,12 +16,16 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . +import os + from trezorlib import tx_api from trezorlib.tx_api import TxApiBitcoin, TxApiTestnet +tests_dir = os.path.dirname(os.path.abspath(__file__)) + def test_txapi_gettx(): - tx_api.cache_dir = '../txcache' + tx_api.cache_dir = os.path.join(tests_dir, '../txcache') TxApiBitcoin.get_tx('39a29e954977662ab3879c66fb251ef753e0912223a83d1dcb009111d28265e5') TxApiBitcoin.get_tx('54aa5680dea781f45ebb536e53dffc526d68c0eb5c00547e323b2c32382dfba3')