test: the suite follows pull-only machines, the proof lock and 200 DPI
The old tests created orders with an automatic machine and moved them without one. They now choose a machine or pass it to the pull, expect the proof lock before any move, and use the 200 DPI clean grade.
This commit is contained in:
@@ -50,8 +50,16 @@ def run():
|
||||
assert other.call('/customer/orders/'+oid)['id']==oid
|
||||
print('PASS: registration claims only current guest records, cross-session account login, revoked sessions, owner UUID is not a credential')
|
||||
|
||||
machine = None
|
||||
def move(state,version):
|
||||
return customer.call('/operator/orders/'+oid+'/move',{'state':state,'version':version,'reason':'Please replace the artwork' if state=='cor' else ''},operator=True)['version']
|
||||
nonlocal machine
|
||||
body={'state':state,'version':version,'reason':'Please replace the artwork' if state=='cor' else ''}
|
||||
if state=='imp':
|
||||
if machine is None:
|
||||
machine=customer.call('/operator/machines',{'name':'Workflow '+uuid4().hex[:6],
|
||||
'products':['textil']},operator=True)['id']
|
||||
body['machine_id']=machine
|
||||
return customer.call('/operator/orders/'+oid+'/move',body,operator=True)['version']
|
||||
# Arte conferida is the print queue (2026-10-23): it takes approved finals only.
|
||||
version=0
|
||||
customer.call('/operator/orders/'+oid+'/move',{'state':'tra','version':version},operator=True,expected=409)
|
||||
@@ -73,7 +81,7 @@ def run():
|
||||
version=move('tra',version)
|
||||
# The print queue's files come named after their order, straight from storage.
|
||||
queued=customer.call('/operator/queue/finals',operator=True)['files']
|
||||
mine=[f for f in queued if urlopen(f['url']).read()==final_one]
|
||||
mine=[f for f in queued if f['order']==oid and urlopen(f['url']).read()==final_one]
|
||||
assert len(mine)==1 and mine[0]['name'].startswith('DTF-%d-item-1-' % mine[0]['number']), queued
|
||||
customer.call('/operator/queue/finals',expected=401)
|
||||
version=move('imp',version);version=move('cor',version)
|
||||
|
||||
Reference in New Issue
Block a user