SessionCache tests depend on logging already being setup
This commit is contained in:
parent
070052f1d6
commit
6325bd3c35
1 changed files with 13 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue