def test_check_whitelist_accepts_all_on_star():
    assert (True == tornado.check_whitelist('192.168.0.1', ['*']))
    assert (True == tornado.check_whitelist('192.168.0.1:80', ['*']))
    assert (True == tornado.check_whitelist('192.168.0.1:5006', ['*']))
    assert (True == tornado.check_whitelist('192.168.0.1:80', ['*:80']))
    assert (False == tornado.check_whitelist('192.168.0.1:80', ['*:81']))
    assert (True == tornado.check_whitelist('192.168.0.1:5006', ['*:*']))
    assert (True == tornado.check_whitelist('192.168.0.1', ['192.168.0.*']))
    assert (True == tornado.check_whitelist('192.168.0.1:5006', ['192.168.0.*']))
    assert (False == tornado.check_whitelist('192.168.1.1', ['192.168.0.*']))
    assert (True == tornado.check_whitelist('foobarbaz', ['*']))
    assert (True == tornado.check_whitelist('192.168.0.1', ['192.168.0.*']))
    assert (False == tornado.check_whitelist('192.168.1.1', ['192.168.0.*']))
    assert (False == tornado.check_whitelist('192.168.0.1', ['192.168.0.*:5006']))
    assert (True == tornado.check_whitelist('192.168.0.1', ['192.168.0.*:80']))
    assert (True == tornado.check_whitelist('foobarbaz', ['*']))
    assert (True == tornado.check_whitelist('foobarbaz', ['*:*']))
    assert (True == tornado.check_whitelist('foobarbaz', ['*:80']))
    assert (False == tornado.check_whitelist('foobarbaz', ['*:5006']))
    assert (True == tornado.check_whitelist('foobarbaz:5006', ['*']))
    assert (True == tornado.check_whitelist('foobarbaz:5006', ['*:*']))
    assert (True == tornado.check_whitelist('foobarbaz:5006', ['*:5006']))
def test_check_whitelist_accepts_all_on_star():
    assert (True == tornado.check_whitelist('192.168.0.1', ['*']))
    assert (True == tornado.check_whitelist('192.168.0.1:80', ['*']))
    assert (True == tornado.check_whitelist('192.168.0.1:5006', ['*']))
    assert (True == tornado.check_whitelist('192.168.0.1:80', ['*:80']))
    assert (False == tornado.check_whitelist('192.168.0.1:80', ['*:81']))
    assert (True == tornado.check_whitelist('192.168.0.1:5006', ['*:*']))
    assert (True == tornado.check_whitelist('192.168.0.1', ['192.168.0.*']))
    assert (True == tornado.check_whitelist('192.168.0.1:5006', ['192.168.0.*']))
    assert (False == tornado.check_whitelist('192.168.1.1', ['192.168.0.*']))
    assert (True == tornado.check_whitelist('foobarbaz', ['*']))
    assert (True == tornado.check_whitelist('192.168.0.1', ['192.168.0.*']))
    assert (False == tornado.check_whitelist('192.168.1.1', ['192.168.0.*']))
    assert (False == tornado.check_whitelist('192.168.0.1', ['192.168.0.*:5006']))
    assert (True == tornado.check_whitelist('192.168.0.1', ['192.168.0.*:80']))
    assert (True == tornado.check_whitelist('foobarbaz', ['*']))
    assert (True == tornado.check_whitelist('foobarbaz', ['*:*']))
    assert (True == tornado.check_whitelist('foobarbaz', ['*:80']))
    assert (False == tornado.check_whitelist('foobarbaz', ['*:5006']))
    assert (True == tornado.check_whitelist('foobarbaz:5006', ['*']))
    assert (True == tornado.check_whitelist('foobarbaz:5006', ['*:*']))
    assert (True == tornado.check_whitelist('foobarbaz:5006', ['*:5006']))