fixing tests
This commit is contained in:
parent
b7e652906e
commit
c5234e0fd4
|
@ -788,7 +788,6 @@ def test_offer_without_to(user: UserClient):
|
||||||
'userFromEmail': user.email,
|
'userFromEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': False,
|
'confirms': False,
|
||||||
'code': 'MAX'
|
'code': 'MAX'
|
||||||
|
@ -816,7 +815,6 @@ def test_offer_without_to(user: UserClient):
|
||||||
'userFromEmail': user.email,
|
'userFromEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': False,
|
'confirms': False,
|
||||||
'code': 'MAX'
|
'code': 'MAX'
|
||||||
|
@ -839,7 +837,6 @@ def test_offer_without_to(user: UserClient):
|
||||||
'userFromEmail': user.email,
|
'userFromEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot2.id,
|
'lot': lot2.id,
|
||||||
'confirms': False,
|
'confirms': False,
|
||||||
'code': 'MAX'
|
'code': 'MAX'
|
||||||
|
@ -870,7 +867,6 @@ def test_offer_without_from(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user2.email,
|
'userToEmail': user2.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot.id,
|
'lot': lot.id,
|
||||||
'confirms': False,
|
'confirms': False,
|
||||||
'code': 'MAX'
|
'code': 'MAX'
|
||||||
|
@ -915,7 +911,6 @@ def test_offer_without_users(user: UserClient):
|
||||||
'devices': [device.id],
|
'devices': [device.id],
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot.id,
|
'lot': lot.id,
|
||||||
'confirms': False,
|
'confirms': False,
|
||||||
'code': 'MAX'
|
'code': 'MAX'
|
||||||
|
@ -949,7 +944,6 @@ def test_offer(user: UserClient):
|
||||||
'userToEmail': user2.email,
|
'userToEmail': user2.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot.id,
|
'lot': lot.id,
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -976,7 +970,6 @@ def test_offer_without_devices(user: UserClient):
|
||||||
'userToEmail': user2.email,
|
'userToEmail': user2.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -985,7 +978,6 @@ def test_offer_without_devices(user: UserClient):
|
||||||
# no there are transfer of devices
|
# no there are transfer of devices
|
||||||
|
|
||||||
|
|
||||||
>>>>>>> feature/endpoint-confirm
|
|
||||||
@pytest.mark.mvp
|
@pytest.mark.mvp
|
||||||
@pytest.mark.usefixtures(conftest.auth_app_context.__name__)
|
@pytest.mark.usefixtures(conftest.auth_app_context.__name__)
|
||||||
def test_price_custom():
|
def test_price_custom():
|
||||||
|
@ -1055,7 +1047,6 @@ def test_endpoint_confirm(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user2.email,
|
'userToEmail': user2.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -1096,7 +1087,6 @@ def test_confirm_revoke(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user2.email,
|
'userToEmail': user2.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -1171,7 +1161,6 @@ def test_usecase_confirmation(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -1361,7 +1350,6 @@ def test_confirmRevoke(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -1476,7 +1464,6 @@ def test_trade_case1(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -1537,7 +1524,6 @@ def test_trade_case2(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -1564,12 +1550,6 @@ def test_trade_case2(user: UserClient, user2: UserClient):
|
||||||
'action': trade.id,
|
'action': trade.id,
|
||||||
'devices': [device1.id, device2.id],
|
'devices': [device1.id, device2.id],
|
||||||
}
|
}
|
||||||
user2.post(res=models.Action, data=request_reconfirm)
|
|
||||||
assert device_10.actions[-1].t == 'Confirm'
|
|
||||||
assert device_10.actions[-1].user == trade.user_from
|
|
||||||
assert device_10.actions[-2].t == 'Confirm'
|
|
||||||
assert device_10.actions[-2].user == trade.user_to
|
|
||||||
assert device_10.actions[-3].t == 'Revoke'
|
|
||||||
|
|
||||||
# Normal revoke
|
# Normal revoke
|
||||||
user.post(res=models.Action, data=request_revoke)
|
user.post(res=models.Action, data=request_revoke)
|
||||||
|
@ -1608,7 +1588,6 @@ def test_trade_case3(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -1666,7 +1645,6 @@ def test_trade_case4(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -1732,7 +1710,6 @@ def test_trade_case5(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -1798,7 +1775,6 @@ def test_trade_case6(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -1866,7 +1842,6 @@ def test_trade_case7(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -1932,7 +1907,6 @@ def test_trade_case8(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -2005,7 +1979,6 @@ def test_trade_case9(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -2086,7 +2059,6 @@ def test_trade_case10(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -2171,7 +2143,6 @@ def test_trade_case11(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -2240,7 +2211,6 @@ def test_trade_case12(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -2315,7 +2285,6 @@ def test_trade_case13(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -2390,7 +2359,6 @@ def test_trade_case14(user: UserClient, user2: UserClient):
|
||||||
'userToEmail': user.email,
|
'userToEmail': user.email,
|
||||||
'price': 10,
|
'price': 10,
|
||||||
'date': "2020-12-01T02:00:00+00:00",
|
'date': "2020-12-01T02:00:00+00:00",
|
||||||
'documentID': '1',
|
|
||||||
'lot': lot['id'],
|
'lot': lot['id'],
|
||||||
'confirms': True,
|
'confirms': True,
|
||||||
}
|
}
|
||||||
|
@ -2442,4 +2410,3 @@ def test_trade_case14(user: UserClient, user2: UserClient):
|
||||||
assert device.actions[-4].user == trade.user_from
|
assert device.actions[-4].user == trade.user_from
|
||||||
assert device.actions[-5].t == 'Trade'
|
assert device.actions[-5].t == 'Trade'
|
||||||
assert device.actions[-5].author == trade.user_to
|
assert device.actions[-5].author == trade.user_to
|
||||||
>>>>>>> feature/endpoint-confirm
|
|
||||||
|
|
|
@ -122,4 +122,4 @@ def test_api_docs(client: Client):
|
||||||
'scheme': 'basic',
|
'scheme': 'basic',
|
||||||
'name': 'Authorization'
|
'name': 'Authorization'
|
||||||
}
|
}
|
||||||
assert len(docs['definitions']) == 122
|
assert len(docs['definitions']) == 125
|
||||||
|
|
Reference in New Issue