def test_meta_info(): name = '/local/ndn/prefix/37=%00' meta_info = MetaInfo() meta_info.content_type = ContentType.BLOB meta_info.freshness_period = 1000 meta_info.final_block_id = Component.from_sequence_num(2) data = make_data(name, meta_info, signer=DigestSha256Signer()) assert (data == b"\x06\x4e\x07\x17\x08\x05local\x08\x03ndn\x08\x06prefix\x25\x01\x00" b"\x14\x0c\x18\x01\x00\x19\x02\x03\xe8\x1a\x03\x25\x01\x02" b"\x16\x03\x1b\x01\x00" b"\x17 \x03\xb8,\x18\xffMw\x84\x86\xa5a\x94e\xcc\xdaQ\x15\xb7\xfb\x19\xab\x9d1lw\'\xdf\xac\x03#\xcad")
def test_meta_info(): name = '/local/ndn/prefix/37=%00' meta_info = MetaInfo() meta_info.content_type = ContentType.BLOB meta_info.freshness_period = 1000 meta_info.final_block_id = Component.from_sequence_num(2) data = make_data(name, meta_info, signer=DigestSha256Signer()) assert ( data == b"\x06\x4e\x07\x17\x08\x05local\x08\x03ndn\x08\x06prefix\x25\x01\x00" b"\x14\x0c\x18\x01\x00\x19\x02\x03\xe8\x1a\x03\x3a\x01\x02" b"\x16\x03\x1b\x01\x00" b"\x17 \x0f^\xa1\x0c\xa7\xf5Fb\xf0\x9cOT\xe0FeC\x8f92\x04\x9d\xabP\x80o\'\x94\xaa={hQ" )