コード例 #1
0
ファイル: test_local_commands.py プロジェクト: ryde/amostra
def test_update_container():
    c = LocalContainerReference()
    cont = dict(uid=str(uuid.uuid4()), container=str(uuid.uuid4()),
                time=ttime.time(),state='empty')

    c.create(**cont)
    c.update({'uid': cont['uid']},
             {'state': 'full'})
    assert next(c.find(uid=cont['uid']))['state'] == 'full'
コード例 #2
0
def test_update_container():
    c = LocalContainerReference()
    cont = dict(uid=str(uuid.uuid4()), container=str(uuid.uuid4()),
                time=ttime.time(),state='empty')

    c.create(**cont)
    c.update({'uid': cont['uid']},
             {'state': 'full'})
    assert next(c.find(uid=cont['uid']))['state'] == 'full'
コード例 #3
0
def test_find_container():
    c = LocalContainerReference()
    cont_dict = dict(uid=str(uuid.uuid4()), time=ttime.time(), name='village',
                     kind='gaul', population='50')
    c.create(**cont_dict)
    assert next(c.find(uid=cont_dict['uid']))['uid'] == cont_dict['uid']
コード例 #4
0
def test_create_container():
    c = LocalContainerReference()
    c.create(time=ttime.time(), uid=str(uuid.uuid4()), name='village',
             type='ancient gaul')
コード例 #5
0
ファイル: test_local_commands.py プロジェクト: ryde/amostra
def test_find_container():
    c = LocalContainerReference()
    cont_dict = dict(uid=str(uuid.uuid4()), time=ttime.time(), name='village',
                     kind='gaul', population='50')
    c.create(**cont_dict)
    assert next(c.find(uid=cont_dict['uid']))['uid'] == cont_dict['uid']
コード例 #6
0
ファイル: test_local_commands.py プロジェクト: ryde/amostra
def test_create_container():
    c = LocalContainerReference()
    c.create(time=ttime.time(), uid=str(uuid.uuid4()), name='village',
             type='ancient gaul')
コード例 #7
0
ファイル: test_local_commands.py プロジェクト: ryde/amostra
def test_constructors():
    # attempt empty reference create
    s_ref = LocalSampleReference()
    c_ref = LocalContainerReference()
    r_ref = LocalRequestReference()