I understand what you're proposing, but I'm backtracking a little. (my kingdom for you and a whiteboard in the same room :)
I think that you could have a hybrid of your db.do_something("desired_return_value") and self.stubs.Set(nova.db, 'instance_get_by_uuid', fake_instance_get) (which I don't think is terrible other than requiring a nested method) to produce: self.sorens_mox.Set(nova.db, 'instance_get_by_uuid', {'name': 'this or that', 'instance_type_id': 42}) which would work with things other than just the db. ----------------------- > So, you've made a much better StubOutWithMock() and slightly better > stubs.Set() by (essentially) ignoring the method parameter checks and just > focusing on the return type. No, no. Read my e-mail again. I don't want to do it that way either. I showed two examples of what I'd like to get rid of, followed by what I'd like to do instead. _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp