def test_handle_create_game(self): exporter1 = LoggingExporter(None) exporter2 = LoggingExporter(None) composite_exporter = CompositeExporter(None, [exporter1, exporter2]) composite_exporter.handle_create_game(None) assert exporter1.handle_create_game_calls == 1 assert exporter2.handle_create_game_calls == 1
def test_handle_change_entity(self): exporter1 = LoggingExporter(None) exporter2 = LoggingExporter(None) composite_exporter = CompositeExporter(None, [exporter1, exporter2]) composite_exporter.handle_change_entity(None) assert exporter1.handle_change_entity_calls == 1 assert exporter2.handle_change_entity_calls == 1
def test_handle_cached_tag_for_dormant_change(self): exporter1 = LoggingExporter(None) exporter2 = LoggingExporter(None) composite_exporter = CompositeExporter(None, [exporter1, exporter2]) composite_exporter.handle_cached_tag_for_dormant_change(None) assert exporter1.handle_cached_tag_for_dormant_change_calls == 1 assert exporter2.handle_cached_tag_for_dormant_change_calls == 1
def test_flush(self): exporter1 = LoggingExporter(None) exporter2 = LoggingExporter(None) composite_exporter = CompositeExporter(None, [exporter1, exporter2]) composite_exporter.flush() assert exporter1.flush_calls == 1 assert exporter2.flush_calls == 1
def test_handle_block(self): exporter1 = LoggingExporter(None) exporter2 = LoggingExporter(None) composite_exporter = CompositeExporter(None, [exporter1, exporter2]) composite_exporter.handle_block( Block(time.time(), 0, 0, 0, 0, 0, 0, 0, 0)) assert exporter1.handle_block_calls == 1 assert exporter2.handle_block_calls == 1