def test_repairbill_dispatch_dispatched(self): u'''已派工的维修单再次派工''' rbgids = [] rbgid = repairbill_public.repairbill_create() rbgids.append(rbgid) repairbill_public.repairbill_submit(rbgids) repairbill_public.repairbill_dispatch(rbgids) rbdpreq = repairbill_public.repairbill_dispatch(rbgids) if 'message":"无可派工维修单信息' in rbdpreq: assert 1 == 1 else: assert 1 == 2
def test_repairbill_dispatch_simple(self): u'''单个维修单派工''' rbgids = [] rbgid = repairbill_public.repairbill_create() rbgids.append(rbgid) repairbill_public.repairbill_submit(rbgids) repairbill_public.repairbill_dispatch(rbgids) rbsreq = repairbill_public.repairbill_select(rbgid) if 'status":"30' in rbsreq: assert 1 == 1 else: assert 1 == 2
def test_repairbill_recode_save(self): u'''维修单报工时保存''' rbgids = [] rbgid = repairbill_public.repairbill_create() rbgids.append(rbgid) repairbill_public.repairbill_submit(rbgids) repairbill_public.repairbill_dispatch(rbgids) repairbill_public.repairbill_saveorrecord(rbgid, 'save') rbsreq = repairbill_public.repairbill_select(rbgid) if 'status":"30' in rbsreq: assert 1 == 1 else: assert 1 == 2
def test_repairbill_recode_recorded(self): u'''已报工的维修单再次报工''' rbgids = [] rbgid = repairbill_public.repairbill_create() rbgids.append(rbgid) repairbill_public.repairbill_submit(rbgids) repairbill_public.repairbill_dispatch(rbgids) repairbill_public.repairbill_saveorrecord(rbgid, 'record') rbdpreq = repairbill_public.repairbill_saveorrecord(rbgid, 'record') if 'message":"已派工单据才可报工' in rbdpreq: assert 1 == 1 else: assert 1 == 2
def test_repairbill_recode_simple(self): u'''单个维修单报工''' rbgids = [] rbgid = repairbill_public.repairbill_create() rbgids.append(rbgid) repairbill_public.repairbill_submit(rbgids) repairbill_public.repairbill_dispatch(rbgids) repairbill_public.repairbill_saveorrecord(rbgid, 'record') rbdpreq = repairbill_public.repairbill_select(rbgid) if 'status":"40' in rbdpreq: assert 1 == 1 else: assert 1 == 2
def test_repairbill_dispatch_more(self): u'''维修单批量派工''' rbgids = [] for c in range(3): rbgid = repairbill_public.repairbill_create() rbgids.append(rbgid) repairbill_public.repairbill_submit(rbgids) repairbill_public.repairbill_dispatch(rbgids) check = 0 for rbgid in rbgids: rbsreq = repairbill_public.repairbill_select(rbgid) if 'status":"30' in rbsreq: check = check + 0 else: check = check + 1 if check == 0: assert 1 == 1 else: assert 1 == 2