예제 #1
0
def test_rrname_compressed():
    rr = RRNAME.parse(
        '\xc0\x02'      # ptr to absolute offset 2
        '\x05hello'     # rr name
        '\x00'          # end of rr name
    )
    assert rr.name == ['hello', '']
예제 #2
0
def test_rrname():
    rr = RRNAME.parse(
        '\x05hello'     # rr name
        '\x00'          # end of rr name
    )
    assert rr.name == ['hello', '']