Beispiel #1
0
def testRun():
    db = DouBan()
    try:
        db.login('cookie_test')
        db.run()
    except Exception, e:
        print repr(e)
        print 'run failure'
        sys.exit(1)
Beispiel #2
0
def testPersistent():
    db = DouBan()
    try:
        db.login('cookie_test')
        db.run()
        db.persistent()
    except KeyboardInterrupt:
        db.persistent()
    except Exception, e:
        db.persistent()
        print repr(e)
        sys.exit(1)