def test_bad_mapped_ips(): assert not is_github_ip('::ffff:c01e:fbff') assert not is_github_ip('::ffff:c01f:1')
def test_bad_ips(): assert not is_github_ip('192.30.251.255') assert not is_github_ip('192.31.0.1')
def test_ip_decoding(): assert is_github_ip(b'192.30.252.1') assert is_github_ip(u'192.30.252.1')
def test_mapped_ip(): assert is_github_ip('::ffff:c01e:fc01')
def test_correct_ip(): assert is_github_ip('192.30.252.1')