

def test_MarketProtocol_rpc_get_image_invalid_image_hash(self):
    catcher = self.catcher
    mp = MarketProtocol(catch_exception.node, self.router, 0, 0)
    self.assertEqual(None, mp.rpc_get_image(mknode(), 'invalid_hash'))
    catch_exception = catcher.pop()
    exception_message = catcher.pop()
    self.assertEquals(catch_exception['message'][0], '[WARNING] could not find image 696e76616c69645f68617368')
    self.assertEquals(exception_message['message'][0], '[WARNING] Image hash is not 20 characters invalid_hash')

dataset/ETHPy150Open OpenBazaar/OpenBazaar-Server/market/tests/test_protocol.py MarketProtocolTest.test_MarketProtocol_rpc_get_image_invalid_image_hash/VarMisuse@20/33 `self`->`catch_exception`