'Our tests tend to use the policies rings like their own personal
playground - which can be a problem in the particular case of a
patched TestCase class where the FakeRing objects are scoped in the
call to the patch_policies wrapper outside of the TestCase instance
which can lead to some bled state.
To help tests get better isolation without having to think about it,
here we\'re capturing the args required to *build* a new FakeRing
instances so we can ensure each test method gets a clean ring setup.
The TestCase can always "tweak" these fresh rings in setUp - or if
they\'d prefer to get the same "reset" behavior with custom FakeRing\'s
they can pass in their own fake_ring_args to patch_policies instead of
setting the object_ring on the policy definitions.'

def _setup_rings(self):

    for (policy, fake_ring_arg) in zip(self.policies, self.fake_ring_args):
        if (fake_ring_arg is not None):
            policy.object_ring = FakeRing(**fake_ring_arg)
