diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-05-02 01:39:35 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-05-02 01:39:35 +0200 |
commit | 30700830b6c0aaaa59c148ebd8edb6931040ed13 (patch) | |
tree | 8868074072e95d9b9119b36e3d6d66a70408775a /tests/helper.py | |
parent | 2b1ee8f4d54fa1672510141a71a5817120ac031c (diff) | |
download | Trader-30700830b6c0aaaa59c148ebd8edb6931040ed13.tar.gz Trader-30700830b6c0aaaa59c148ebd8edb6931040ed13.tar.zst Trader-30700830b6c0aaaa59c148ebd8edb6931040ed13.zip |
Refactor databases access
Diffstat (limited to 'tests/helper.py')
-rw-r--r-- | tests/helper.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/helper.py b/tests/helper.py index b85bf3a..935e060 100644 --- a/tests/helper.py +++ b/tests/helper.py | |||
@@ -4,7 +4,7 @@ from decimal import Decimal as D | |||
4 | from unittest import mock | 4 | 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 | 7 | import portfolio, market, main, store, dbs |
8 | 8 | ||
9 | __all__ = ["limits", "unittest", "WebMockTestCase", "mock", "D", | 9 | __all__ = ["limits", "unittest", "WebMockTestCase", "mock", "D", |
10 | "StringIO"] | 10 | "StringIO"] |
@@ -48,6 +48,8 @@ class WebMockTestCase(unittest.TestCase): | |||
48 | callback=None), | 48 | callback=None), |
49 | mock.patch.multiple(portfolio.Computation, | 49 | mock.patch.multiple(portfolio.Computation, |
50 | computations=portfolio.Computation.computations), | 50 | computations=portfolio.Computation.computations), |
51 | mock.patch.multiple(dbs, | ||
52 | redis=None, psql=None) | ||
51 | ] | 53 | ] |
52 | for patcher in self.patchers: | 54 | for patcher in self.patchers: |
53 | patcher.start() | 55 | patcher.start() |