From c40b811f19414042503514ff9fdb97dc062c88cc Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 6 Apr 2021 19:35:17 +0200 Subject: [PATCH] flush after creating mock trades --- tests/conftest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index f8c1c5357..4a2106a4d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -220,6 +220,9 @@ def create_mock_trades(fee, use_db: bool = True): trade = mock_trade_6(fee) add_trade(trade) + if use_db: + Trade.query.session.flush() + @pytest.fixture(autouse=True) def patch_coingekko(mocker) -> None: