Change ReadyToUse for Available
This commit is contained in:
parent
922a8c743a
commit
f8ec8fc882
|
@ -104,7 +104,7 @@ class Dummy:
|
|||
|
||||
# Perform generic actions
|
||||
for pc, model in zip(pcs,
|
||||
{m.ToRepair, m.Repair, m.ToPrepare, m.ReadyToUse, m.ToPrepare,
|
||||
{m.ToRepair, m.Repair, m.ToPrepare, m.Available, m.ToPrepare,
|
||||
m.Prepare}):
|
||||
user.post({'type': model.t, 'devices': [pc]}, res=m.Action)
|
||||
|
||||
|
@ -144,7 +144,7 @@ class Dummy:
|
|||
|
||||
user.post({'type': m.ToPrepare.t, 'devices': [sample_pc]}, res=m.Action)
|
||||
user.post({'type': m.Prepare.t, 'devices': [sample_pc]}, res=m.Action)
|
||||
user.post({'type': m.ReadyToUse.t, 'devices': [sample_pc]}, res=m.Action)
|
||||
user.post({'type': m.Available.t, 'devices': [sample_pc]}, res=m.Action)
|
||||
user.post({'type': m.Price.t, 'device': sample_pc, 'currency': 'EUR', 'price': 85},
|
||||
res=m.Action)
|
||||
# todo test reserve
|
||||
|
|
|
@ -188,9 +188,9 @@ class RepairDef(ActionDef):
|
|||
SCHEMA = schemas.Repair
|
||||
|
||||
|
||||
class ReadyToUse(ActionDef):
|
||||
class Available(ActionDef):
|
||||
VIEW = None
|
||||
SCHEMA = schemas.ReadyToUse
|
||||
SCHEMA = schemas.Available
|
||||
|
||||
|
||||
class ToPrepareDef(ActionDef):
|
||||
|
|
|
@ -1256,7 +1256,7 @@ class Repair(ActionWithMultipleDevices):
|
|||
"""
|
||||
|
||||
|
||||
class ReadyToUse(ActionWithMultipleDevices):
|
||||
class Available(ActionWithMultipleDevices):
|
||||
"""The device is ready to be used.
|
||||
|
||||
This involves greater preparation from the ``Prepare`` action,
|
||||
|
|
|
@ -347,8 +347,8 @@ class Repair(ActionWithMultipleDevices):
|
|||
__doc__ = m.Repair.__doc__
|
||||
|
||||
|
||||
class ReadyToUse(ActionWithMultipleDevices):
|
||||
__doc__ = m.ReadyToUse.__doc__
|
||||
class Available(ActionWithMultipleDevices):
|
||||
__doc__ = m.Available.__doc__
|
||||
|
||||
|
||||
class ToPrepare(ActionWithMultipleDevices):
|
||||
|
|
|
@ -56,5 +56,5 @@ class Physical(State):
|
|||
Repaired = e.Repair
|
||||
Preparing = e.ToPrepare
|
||||
Prepared = e.Prepare
|
||||
ReadyToBeUsed = e.ReadyToUse
|
||||
ReadyToBeUsed = e.Available
|
||||
InUse = e.Live
|
||||
|
|
|
@ -168,7 +168,7 @@ def test_update_components_action_multiple():
|
|||
hdd = HardDrive(serial_number='foo', manufacturer='bar', model='foo-bar')
|
||||
computer.components.add(hdd)
|
||||
|
||||
ready = models.ReadyToUse()
|
||||
ready = models.Available()
|
||||
assert not ready.devices
|
||||
assert not ready.components
|
||||
|
||||
|
@ -214,7 +214,7 @@ def test_update_parent():
|
|||
(models.ToRepair, states.Physical.ToBeRepaired),
|
||||
(models.Repair, states.Physical.Repaired),
|
||||
(models.ToPrepare, states.Physical.Preparing),
|
||||
(models.ReadyToUse, states.Physical.ReadyToBeUsed),
|
||||
(models.Available, states.Physical.ReadyToBeUsed),
|
||||
(models.Prepare, states.Physical.Prepared)
|
||||
]))
|
||||
def test_generic_action(action_model_state: Tuple[models.Action, states.Trading],
|
||||
|
|
Reference in New Issue