'Test whether we receive the right response when we try a transfer that errors'

@deferred(timeout=20)
def test_transfer_error(self):

    self.session.lm.market_community.wallets['BTC'].transfer = (lambda *_: fail(Failure(RuntimeError('error'))))
    self.session.lm.market_community.wallets['BTC'].created = True
    self.should_check_equality = False
    post_data = {'amount': 3, 'destination': 'abc'}
    return self.do_request('wallets/BTC/transfer', expected_code=500, request_type='POST', post_data=post_data)
