test.py
@@ -40,7 +40,11 @@ for message in so_far_today: protocol.handleMessage(bs, message) def testRecoverBook(bs: {str, book.Book}): f = open("data.test", "r"); so_far_today = f.read(); for message in so_far_today: protocol.handleMessage(bs, message) # print(json.dumps(message)) # print(send(message)) # printRecoveryLog() @@ -49,7 +53,8 @@ # wstest() bs = {} recoverBook(bs) # recoverBook(bs) testRecoverBook(bs) print(list(bs)) for i in bs: print(bs[i].product)