Esempio n. 1
0
def test_fill_4byte_blocks():
    a = Address('::1')
    assert a.fill_4byte_blocks() == '0000:0000:0000:0000:0000:0000:0000:0001'
Esempio n. 2
0
def test_shorten():
    a = Address("0000:0000:0000:0000:0000:0000:7f00:0001")
    b = Address(a.shorten())
    assert a.shorten() == "::7f00:1"
    assert b.fill_4byte_blocks() == "0000:0000:0000:0000:0000:0000:7f00:0001"