def handle_data(self, data):
        if self.incr == 0:
            assert 0 not in self.portfolio.positions
        else:
            assert self.portfolio.positions[0]['amount'] == \
                self.incr, "Orders not filled immediately."
            assert self.portfolio.positions[0]['last_sale_price'] == \
                data.current(sid(0), "price"), \
                "Orders not filled at current price."
        self.incr += 2

        multiplier = 2.
        if isinstance(self.sid(0), Future):
            multiplier *= self.sid(0).multiplier

        self.order_value(
            self.sid(0),
            data.current(sid(0), "price") * multiplier
        )
dataset/ETHPy150Open quantopian/zipline/zipline/test_algorithms.py/TestOrderValueAlgorithm.handle_data/original