From 6325bd3c358bffb5cd6bb1caa5e92f354bcf2312 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Sun, 21 May 2017 15:06:39 -0700 Subject: [PATCH] SessionCache tests depend on logging already being setup --- tests/test_session_cache.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_session_cache.py b/tests/test_session_cache.py index 668322c..92f1599 100644 --- a/tests/test_session_cache.py +++ b/tests/test_session_cache.py @@ -3,6 +3,7 @@ import tempfile from wakatime.session_cache import SessionCache +from wakatime.logger import setup_logging from . import utils @@ -14,6 +15,18 @@ class SessionCacheTestCase(utils.TestCase): ['wakatime.offlinequeue.Queue.connect', None], ] + def setUp(self): + class MockArgs(object): + timestamp = 0 + is_write = False + entity = '' + version = '' + plugin = '' + verbose = False + logfile = '' + self.args = MockArgs() + setup_logging(self.args, self.args.version) + def test_can_crud_session(self): with tempfile.NamedTemporaryFile() as fh: cache = SessionCache()