Instead of having this return a list (to avoid the issues with passing a mock into the ClientMatchRule queryset) you should mock the ClientMatchRule queryset as well.

However, looking at the tests we left in for the relocated client match rule logic from the last PR (which is what is breaking without this), I realize we didn't do a great job of testing it properly. We should be either mocking both querysets completely and asserting the right methods were called, or not mocking either of the querysets and testing the returned snippets for every case that matters. For this case I'd prefer the latter, as mocking querysets is brittle what with method order and the odd setup of using two querysets that we have.

I don't think fixing up these is in the scope of this PR, so for now we can leave this as you have it. We just need to come back to the tests soon and clean them up.