Convert remaining use of mox
Convert remaining use of mox

This is pretty ugly to look at, but essentially I've gone and replaced
all occurences of

  foo.bar(call_arg).AndReturn(return_arg)

with a mock of 'foo', followed by:

  mock_foo.return_value = return_arg

  <call>

  mock_foo.assert_call_once_with(call_arg)

Or 'side_effect'/'assert_has_calls' for functions that are called
multiple times.

Change-Id: I8960368d56604315d271aa958c5c6c361e512918
Signed-off-by: Stephen Finucane <4725dc7f3632bf126d9fbdc30c347e91e8d2fe16@redhat.com>

openstack/oslo.db,openstack/oslo.db