adding trade without devices
This commit is contained in:
parent
2790a7756c
commit
2d305f5a43
|
@ -774,20 +774,18 @@ def test_trade_endpoint(user: UserClient, user2: UserClient):
|
||||||
|
|
||||||
@pytest.mark.mvp
|
@pytest.mark.mvp
|
||||||
@pytest.mark.usefixtures(conftest.app_context.__name__)
|
@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"""
|
"""Test one offer with automatic confirmation and without user to"""
|
||||||
lot, _ = user.post({'name': 'MyLot'}, res=Lot)
|
lot, _ = user.post({'name': 'MyLot'}, res=Lot)
|
||||||
|
|
||||||
request_post = {
|
request_post = {
|
||||||
'type': 'Trade',
|
'type': 'Trade',
|
||||||
'devices': [],
|
|
||||||
'userFromEmail': user.email,
|
'userFromEmail': user.email,
|
||||||
'price': 10,
|
'userToEmail': user2.email,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': False,
|
'confirms': True,
|
||||||
'code': 'MAX'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
user.post(res=models.Action, data=request_post)
|
user.post(res=models.Action, data=request_post)
|
||||||
|
|
||||||
trade = models.Trade.query.one()
|
trade = models.Trade.query.one()
|
||||||
|
|
Reference in New Issue