diff --git a/kallithea/tests/base.py b/kallithea/tests/base.py --- a/kallithea/tests/base.py +++ b/kallithea/tests/base.py @@ -23,14 +23,11 @@ import time from tg import config from webtest import TestApp -from kallithea import is_windows, model +from kallithea import model from kallithea.model.db import Notification, User, UserNotification from kallithea.model.meta import Session from kallithea.lib.utils2 import safe_str -os.environ['TZ'] = 'UTC' -if not is_windows: - time.tzset() log = logging.getLogger(__name__) diff --git a/kallithea/tests/conftest.py b/kallithea/tests/conftest.py --- a/kallithea/tests/conftest.py +++ b/kallithea/tests/conftest.py @@ -2,6 +2,7 @@ import os import sys import logging import pkg_resources +import time from paste.deploy import loadwsgi from routes.util import URLGenerator @@ -21,6 +22,10 @@ import kallithea.tests.base # FIXME: nee from tg.util.webtest import test_context def pytest_configure(): + os.environ['TZ'] = 'UTC' + if not kallithea.is_windows: + time.tzset() + path = os.getcwd() sys.path.insert(0, path) pkg_resources.working_set.add_entry(path)