From 8bbca32edc344c7ee2f5ea5db5448a4c4ff79684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 22 Mar 2019 15:54:58 +0100 Subject: Fix timezone in tests --- tests/helper.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/helper.py') diff --git a/tests/helper.py b/tests/helper.py index a2f8a22..930d04a 100644 --- a/tests/helper.py +++ b/tests/helper.py @@ -5,9 +5,10 @@ from unittest import mock import requests_mock from io import StringIO import portfolio, market, main, store, dbs +import datetime __all__ = ["limits", "unittest", "WebMockTestCase", "mock", "D", - "StringIO"] + "StringIO", "tz"] limits = ["acceptance", "unit"] for test_type in limits: @@ -19,6 +20,9 @@ for test_type in limits: limits = [test_type] break +def tz(hours): + return datetime.timezone(datetime.timedelta(hours=hours)) + class WebMockTestCase(unittest.TestCase): import time -- cgit v1.2.3