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_frame_name(self): frame1 = Frame() frame1.name = 'this is a test' assert frame1.name == 'this is a test' frame2 = Frame('this is a test') assert frame2.name == 'this is a test'