def test_frame_empty(): frame = Frame() assert frame.id assert frame.name is None assert frame.data == {} assert frame.source is None assert frame.target is None assert frame.space is None assert frame.reply_to is None frame.name = 'test' frame.data = {'a': 'b'} frame.target = 'test-target' frame.space = 'test-space' frame.reply_to = 'test-reply-to' assert frame.name == 'test' assert frame.data == {'a': 'b'} assert frame.target == 'test-target' assert frame.space == 'test-space' assert frame.reply_to == 'test-reply-to'
def test_data(self): frame1 = Frame() frame1.data = {'a': 'test'} assert frame1.data == {'a': 'test'} frame2 = Frame(data={'a': 'test'}) assert frame2.data == {'a': 'test'}