示例#1
0
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'
示例#2
0
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'
示例#3
0
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']
示例#4
0
def test_create_request():
    r = LocalRequestReference()
    r.create(sample=None, time=ttime.time(), uid=str(uuid.uuid4()))
示例#5
0
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']
示例#6
0
def test_create_request():
    r = LocalRequestReference()
    r.create(sample=None, time=ttime.time(), uid=str(uuid.uuid4()))