From be6d01729da369aa0b9c975dcdded3f7833fc7ba Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 5 Feb 2021 11:59:18 +0100 Subject: [PATCH] fix(tests): TxCache needs to respond to `x in tx_cache` --- tests/tx_cache.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tx_cache.py b/tests/tx_cache.py index 2a14fd4e0..a802ffb38 100755 --- a/tests/tx_cache.py +++ b/tests/tx_cache.py @@ -74,6 +74,13 @@ class TxCache: def __getitem__(self, key): return self.get_tx(key.hex()) + def __contains__(self, key): + try: + self.get_tx(key.hex()) + return True + except Exception: + return False + @click.command() @click.argument("coin_name")