fixing general case for devices
This commit is contained in:
parent
118825ed77
commit
15fa4546d1
|
@ -137,9 +137,7 @@ class Metrics(MetricsMix):
|
||||||
if the action is one trade action, is possible than have a list of confirmations.
|
if the action is one trade action, is possible than have a list of confirmations.
|
||||||
Get the doble confirm for to know if this trade is confirmed or not.
|
Get the doble confirm for to know if this trade is confirmed or not.
|
||||||
"""
|
"""
|
||||||
if hasattr(self.act, 'acceptances'):
|
if self.device.trading == 'TradeConfirmed':
|
||||||
accept = self.act.acceptances[-1]
|
|
||||||
if accept.t == 'Confirm' and accept.user == self.act.user_to:
|
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
@ -304,7 +304,6 @@ def test_visual_metrics_for_old_owners(user: UserClient, user2: UserClient):
|
||||||
@pytest.mark.usefixtures(conftest.app_context.__name__)
|
@pytest.mark.usefixtures(conftest.app_context.__name__)
|
||||||
def test_bug_trade_confirmed(user: UserClient, user2: UserClient):
|
def test_bug_trade_confirmed(user: UserClient, user2: UserClient):
|
||||||
"""When the receiber do a Trade, then the confirmation is wrong."""
|
"""When the receiber do a Trade, then the confirmation is wrong."""
|
||||||
# Insert computer
|
|
||||||
lenovo = yaml2json('desktop-9644w8n-lenovo-0169622.snapshot')
|
lenovo = yaml2json('desktop-9644w8n-lenovo-0169622.snapshot')
|
||||||
snap1, _ = user.post(json_encode(lenovo), res=ma.Snapshot)
|
snap1, _ = user.post(json_encode(lenovo), res=ma.Snapshot)
|
||||||
lot, _ = user.post({'name': 'MyLot'}, res=Lot)
|
lot, _ = user.post({'name': 'MyLot'}, res=Lot)
|
||||||
|
|
Reference in New Issue