def METHOD_NAME(database, exchange_manager, function_scope_messages_aggregator):
    kraken1 = MockKraken(
        name='mockkraken_1',
        api_key=make_api_key(),
        secret=make_api_secret(),
        database=database,
        msg_aggregator=function_scope_messages_aggregator,
    )
    kraken2 = MockKraken(
        name='mockkraken_2',
        api_key=make_api_key(),
        secret=make_api_secret(),
        database=database,
        msg_aggregator=function_scope_messages_aggregator,
    )
    binance1 = Binance(
        name='mockbinance_1',
        api_key=make_api_key(),
        secret=make_api_secret(),
        database=database,
        msg_aggregator=function_scope_messages_aggregator,
    )
    binance2 = Binance(
        name='mockbinance_2',
        api_key=make_api_key(),
        secret=make_api_secret(),
        database=database,
        msg_aggregator=function_scope_messages_aggregator,
    )
    exchange_manager.initialize_exchanges({}, database)
    exchange_manager.connected_exchanges[Location.KRAKEN].append(kraken1)
    exchange_manager.connected_exchanges[Location.KRAKEN].append(kraken2)
    exchange_manager.connected_exchanges[Location.BINANCE].append(binance1)
    exchange_manager.connected_exchanges[Location.BINANCE].append(binance2)
    assert set(exchange_manager.iterate_exchanges()) == {kraken1, kraken2, binance1, binance2}
    with database.user_write() as cursor:
        database.set_settings(cursor, ModifiableDBSettings(
            non_syncing_exchanges=[kraken1.location_id(), kraken2.location_id()],
        ))
        assert set(exchange_manager.iterate_exchanges()) == {binance1, binance2}
        database.set_settings(cursor, ModifiableDBSettings(
            non_syncing_exchanges=[binance1.location_id()],
        ))
        assert set(exchange_manager.iterate_exchanges()) == {binance2, kraken1, kraken2}