diff --git a/lbrynet/tests/functional/test_misc.py b/lbrynet/tests/functional/test_misc.py index 34e0d80c9..b134b6da2 100644 --- a/lbrynet/tests/functional/test_misc.py +++ b/lbrynet/tests/functional/test_misc.py @@ -4,7 +4,6 @@ import os import platform import shutil import sys -import random import unittest from hashlib import md5 diff --git a/lbrynet/tests/mocks.py b/lbrynet/tests/mocks.py index 7de4927c7..25ac42e80 100644 --- a/lbrynet/tests/mocks.py +++ b/lbrynet/tests/mocks.py @@ -148,7 +148,8 @@ class PointTraderKeyQueryHandler(object): try: decode_rsa_key(new_encoded_pub_key) except (ValueError, TypeError, IndexError): - return defer.fail(Failure(ValueError("Client sent an invalid public key: {}".format(new_encoded_pub_key)))) + value_error = ValueError("Client sent an invalid public key: {}".format(new_encoded_pub_key)) + return defer.fail(Failure(value_error)) self.public_key = new_encoded_pub_key self.wallet.set_public_key_for_peer(self.peer, self.public_key) fields = {'public_key': self.wallet.encoded_public_key} diff --git a/requirements.txt b/requirements.txt index bea7b8a65..37725800c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,3 +26,4 @@ slowaes==0.1a1 txJSON-RPC==0.5 wsgiref==0.1.2 zope.interface==4.3.3 +treq==17.8.0 diff --git a/setup.py b/setup.py index 7cc30c751..d4e4c0f43 100644 --- a/setup.py +++ b/setup.py @@ -27,6 +27,7 @@ requires = [ 'requests', 'txJSON-RPC', 'zope.interface', + 'treq', 'docopt' ]