示例#1
0
def test_unit_commandDaemon():
    replay.commandDaemon('start')
    sleep(10)
    try:
        urllib2.urlopen('http://localhost:5001')
    except urllib2.HTTPError, e:
        assert e.code == 404
示例#2
0
def test_unit_commandDaemon():
    replay.commandDaemon('start')
    sleep(10)
    try:
        urllib2.urlopen('http://localhost:5001')
    except urllib2.HTTPError as e:
        assert e.code == 404
    except Exception as e:
        assert False
示例#3
0
def test_unit_commandDaemon():
    replay.commandDaemon('start')
    sleep(10)
    try:
        urllib.request.urlopen('http://localhost:5001')
    except urllib.error.HTTPError as e:
        assert e.code == 404
    except Exception as e:
        assert False