From 23ede44bff6a3136900c2a2612d3d01d9d69e82d Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 6 Aug 2018 19:05:16 -0400 Subject: [PATCH] fix blob downloader test on py3 not tying lbrynet db to wallet db just yet --- lbrynet/cli.py | 3 +++ lbrynet/database/storage.py | 2 +- tests/unit/core/test_HTTPBlobDownloader.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lbrynet/cli.py b/lbrynet/cli.py index d167766ea..3c09515cc 100644 --- a/lbrynet/cli.py +++ b/lbrynet/cli.py @@ -6,6 +6,9 @@ from requests.exceptions import ConnectionError from docopt import docopt from textwrap import dedent +from twisted.internet.asyncioreactor import install +install(asyncio.get_event_loop()) + from lbrynet.daemon.auth.client import LBRYAPIClient from lbrynet.core.system_info import get_platform from lbrynet.daemon.Daemon import Daemon diff --git a/lbrynet/database/storage.py b/lbrynet/database/storage.py index 244400ac3..6faebe204 100644 --- a/lbrynet/database/storage.py +++ b/lbrynet/database/storage.py @@ -96,7 +96,7 @@ class SqliteConnection(adbapi.ConnectionPool): cls.reactor = reactor -class SQLiteStorage(WalletDatabase): +class SQLiteStorage: CREATE_TABLES_QUERY = """ pragma foreign_keys=on; diff --git a/tests/unit/core/test_HTTPBlobDownloader.py b/tests/unit/core/test_HTTPBlobDownloader.py index a51740239..18ea1d194 100644 --- a/tests/unit/core/test_HTTPBlobDownloader.py +++ b/tests/unit/core/test_HTTPBlobDownloader.py @@ -88,7 +88,7 @@ class HTTPBlobDownloaderTest(unittest.TestCase): def collect(response, write): - write('f' * response.length) + write(b'f' * response.length) def bad_collect(response, write):