diff options
Diffstat (limited to 'tests/helper.py')
-rw-r--r-- | tests/helper.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 | |||
5 | import requests_mock | 5 | import requests_mock |
6 | from io import StringIO | 6 | from io import StringIO |
7 | import portfolio, market, main, store, dbs | 7 | import portfolio, market, main, store, dbs |
8 | import datetime | ||
8 | 9 | ||
9 | __all__ = ["limits", "unittest", "WebMockTestCase", "mock", "D", | 10 | __all__ = ["limits", "unittest", "WebMockTestCase", "mock", "D", |
10 | "StringIO"] | 11 | "StringIO", "tz"] |
11 | 12 | ||
12 | limits = ["acceptance", "unit"] | 13 | limits = ["acceptance", "unit"] |
13 | for test_type in limits: | 14 | for test_type in limits: |
@@ -19,6 +20,9 @@ for test_type in limits: | |||
19 | limits = [test_type] | 20 | limits = [test_type] |
20 | break | 21 | break |
21 | 22 | ||
23 | def tz(hours): | ||
24 | return datetime.timezone(datetime.timedelta(hours=hours)) | ||
25 | |||
22 | class WebMockTestCase(unittest.TestCase): | 26 | class WebMockTestCase(unittest.TestCase): |
23 | import time | 27 | import time |
24 | 28 | ||