def test_RemoveOrder(self):
        orderBook = MemoryOrderRepository(self.rpcServer)
        order = self.getTestOrder()

        orderId = orderBook.AddOrder(order['rawtx'], order['prevtxs'])
        orderRetrieved = orderBook.GetOrder(orderId)
        self.assertEqual(order['rawtx'], orderRetrieved['rawtx'])
        self.assertEqual(order['prevtxs'], orderRetrieved['prevtxs'])

        self.assertTrue(orderBook.RemoveOrder(orderId))
        with self.assertRaises(OrderNotFound):
            orderBook.GetOrder(orderId)
    def test_GetOrder(self):
        orderBook = MemoryOrderRepository(self.rpcServer)
        order = self.getTestOrder()

        orderId = orderBook.AddOrder(order['rawtx'], order['prevtxs'])
        orderRetrieved = orderBook.GetOrder(orderId)
        self.assertEqual(order['rawtx'], orderRetrieved['rawtx'])
        self.assertEqual(order['prevtxs'], orderRetrieved['prevtxs'])
    def test_GetOrderNotFound(self):
        orderBook = MemoryOrderRepository(self.rpcServer)

        orderId = '0000000000000000000000000000000000000000000000000000000000000404'
        with self.assertRaises(OrderNotFound):
            orderBook.GetOrder(orderId)