예제 #1
0
def test_frame_reply_with_name():
    f = Frame('test-frame')
    freply = f.reply('test-reply')
    assert freply.name == 'test-reply'
    assert freply.meta.get('reply_to') == f.uuid
예제 #2
0
def test_frame_reply_for_request():
    f = Frame('test-frame', kind=Kind.REQUEST)
    freply = f.reply()
    assert freply.meta.get('reply_to') == f.uuid
    assert freply.kind == Kind.RESPONSE
예제 #3
0
def test_frame_reply():
    f = Frame('test-frame')
    freply = f.reply()
    assert freply.meta.get('reply_to') == f.uuid
예제 #4
0
def test_frame_reply_with_meta():
    meta = {'test': 'item'}
    f = Frame('test-frame')
    freply = f.reply(meta=meta)
    assert freply.meta.get('reply_to') == f.uuid
    assert freply.meta.get('test') == 'item'