From 2d305f5a4326185c2ee0677cf8cba473bfa107ad Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 1 Oct 2021 13:18:56 +0200 Subject: [PATCH] adding trade without devices --- tests/test_action.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/test_action.py b/tests/test_action.py index 11e98560..fe94d518 100644 --- a/tests/test_action.py +++ b/tests/test_action.py @@ -774,20 +774,18 @@ def test_trade_endpoint(user: UserClient, user2: UserClient): @pytest.mark.mvp @pytest.mark.usefixtures(conftest.app_context.__name__) -def test_trade_without_device(user: UserClient): +def test_trade_without_device(user: UserClient, user2: UserClient): """Test one offer with automatic confirmation and without user to""" lot, _ = user.post({'name': 'MyLot'}, res=Lot) request_post = { 'type': 'Trade', - 'devices': [], 'userFromEmail': user.email, - 'price': 10, - 'date': "2020-12-01T02:00:00+00:00", + 'userToEmail': user2.email, 'lot': lot['id'], - 'confirms': False, - 'code': 'MAX' + 'confirms': True, } + user.post(res=models.Action, data=request_post) trade = models.Trade.query.one()