From 707ab831fd6f7e0e545ce66584d2acdcc5763b06 Mon Sep 17 00:00:00 2001 From: hackrush Date: Sat, 18 Aug 2018 01:37:57 +0530 Subject: [PATCH] Fake Analytics for test_cli --- tests/integration/cli/test_cli.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/integration/cli/test_cli.py b/tests/integration/cli/test_cli.py index a4dce67ef..dfbc58d40 100644 --- a/tests/integration/cli/test_cli.py +++ b/tests/integration/cli/test_cli.py @@ -12,6 +12,19 @@ from lbrynet.daemon.Components import DATABASE_COMPONENT, BLOB_COMPONENT, HEADER from lbrynet.daemon.Daemon import Daemon +class FakeAnalytics: + + @property + def is_started(self): + return True + + def send_server_startup_success(self): + pass + + def shutdown(self): + pass + + class CLIIntegrationTest(unittest.TestCase): USE_AUTH = False @@ -28,7 +41,7 @@ class CLIIntegrationTest(unittest.TestCase): conf.settings["components_to_skip"] = skip conf.settings.initialize_post_conf_load() Daemon.component_attributes = {} - self.daemon = Daemon() + self.daemon = Daemon(analytics_manager=FakeAnalytics()) yield self.daemon.start_listening() def tearDown(self):