My understanding is that in 2.X everything happens at the manage.py stage with haystack and therefore site.register is no longer required. Some of the register statements in the codebase have been guarded with the check for settings.TESTING
and some have not. How can I effect that functionality with haystack 2.X?
I don't have the reputation to comment (this may not be a real answer). I haven't used the old site.register stuff in haystack. I'm also guessing a little at what you are trying to do. With those caveats...
One possibility is to have two indexes, one for testing and one as your default. Do you include or exclude based on settings.TESTING being true? The migration docs mention an EXCLUDED_INDEXES setting that you can use in your backend definitions. So maybe if you have some expensive/unneeded indexes, these can go in a separate search index file/module and then be excluded from your testing backend. The ones in your testing and default index could use other indexes in a common file.
With the above, you would also need to mess with the routing so the right backend gets used during tests. Another possibility is to just define the "real" default in your main settings. Then, in a test_settings file, override the haystack connection with your testing setup as the default (including the EXCLUDED_INDEXES). Then you don't need to sprinkle your tests with using('test') 's.
https://django-haystack.readthedocs.org/en/latest/multiple_index.html might be good reading if you haven't already looked at it 80 times trying to get your migration to work ;)