def test_update_request(): r = LocalRequestReference() req = dict(uid=str(uuid.uuid4()), sample=str(uuid.uuid4()), time=ttime.time(), scan='mesh') r.create(**req) r.update({'uid': req['uid']}, {'scan': 'energy'}) assert next(r.find(uid=req['uid']))['scan'] == 'energy'
def test_find_request(): r = LocalRequestReference() req_dict = dict(uid=str(uuid.uuid4()), time=ttime.time(), name='war', kind='street fight', state='inactive', winner='gauls') r.create(**req_dict) assert next(r.find(uid=req_dict['uid']))['uid'] == req_dict['uid']
def test_create_request(): r = LocalRequestReference() r.create(sample=None, time=ttime.time(), uid=str(uuid.uuid4()))