def test_ip4_host():
    net = '8.8.8.8/32'
    n = Network(site_id=1, cidr=net)
    assert n['network_address'] == '8.8.8.8'
    assert n['prefix_length'] == 32
    assert n.identifier == net
    assert n['site_id'] == 1
    assert n.is_host
    assert n.resource_name == 'networks'
    assert n['state'] == 'assigned'
    assert dict(n)
    assert n['attributes'] == {}
    assert n['network_address']
Test to make sure IPv4 host works fine
dataset/ETHPy150Open dropbox/pynsot/tests/test_models.py/test_ip4_host