def test_unsubscribe_quote_ticks(self): # Arrange actor = MockActor() actor.register_base( trader_id=self.trader_id, msgbus=self.msgbus, cache=self.cache, clock=self.clock, logger=self.logger, ) actor.subscribe_quote_ticks(AUDUSD_SIM.id) # Act actor.unsubscribe_quote_ticks(AUDUSD_SIM.id) # Assert assert self.data_engine.subscribed_quote_ticks() == [] assert self.data_engine.command_count == 2
def test_subscribe_quote_ticks(self): # Arrange actor = MockActor() actor.register_base( trader_id=self.trader_id, msgbus=self.msgbus, cache=self.cache, clock=self.clock, logger=self.logger, ) # Act actor.subscribe_quote_ticks(AUDUSD_SIM.id) # Assert expected_instrument = InstrumentId(Symbol("AUD/USD"), Venue("SIM")) assert self.data_engine.subscribed_quote_ticks() == [ expected_instrument ] assert self.data_engine.command_count == 1