From 2fc9171a3fa1327c7da96b12cd96b832eb7f5a99 Mon Sep 17 00:00:00 2001 From: chrisr3d Date: Tue, 17 Dec 2019 16:32:29 +0100 Subject: [PATCH] fix: [tests] Avoiding issues with btc addresses --- tests/test_expansions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_expansions.py b/tests/test_expansions.py index a2bda45..4636e4d 100644 --- a/tests/test_expansions.py +++ b/tests/test_expansions.py @@ -86,7 +86,10 @@ class TestExpansions(unittest.TestCase): def test_btc_steroids(self): query = {"module": "btc_steroids", "btc": "1ES14c7qLb5CYhLMUekctxLgc1FV2Ti9DA"} response = self.misp_modules_post(query) - self.assertTrue(self.get_values(response).startswith('\n\nAddress:\t1ES14c7qLb5CYhLMUekctxLgc1FV2Ti9DA\nBalance:\t0.0000000000 BTC (+0.0005355700 BTC / -0.0005355700 BTC)')) + try: + self.assertTrue(self.get_values(response).startswith('\n\nAddress:\t1ES14c7qLb5CYhLMUekctxLgc1FV2Ti9DA\nBalance:\t0.0000000000 BTC (+0.0005355700 BTC / -0.0005355700 BTC)')) + except Exception: + self.assertEqual(self.get_values(response), 'Not a valid BTC address') def test_btc_scam_check(self): query = {"module": "btc_scam_check", "btc": "1ES14c7qLb5CYhLMUekctxLgc1FV2Ti9DA"}