openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #05651
Re: [nova-testing] Efforts for Essex
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.
Follow ups
References
-
[nova-testing] Efforts for Essex
From: Soren Hansen, 2011-11-21
-
Re: [nova-testing] Efforts for Essex
From: Kevin L. Mitchell, 2011-11-21
-
Re: [nova-testing] Efforts for Essex
From: Rohit Karajgi, 2011-11-22
-
Re: [nova-testing] Efforts for Essex
From: Soren Hansen, 2011-11-22
-
Re: [nova-testing] Efforts for Essex
From: Jay Pipes, 2011-11-22
-
Re: [nova-testing] Efforts for Essex
From: Kevin L. Mitchell, 2011-11-22
-
Re: [nova-testing] Efforts for Essex
From: Jay Pipes, 2011-11-22
-
Re: [nova-testing] Efforts for Essex
From: Soren Hansen, 2011-11-22
-
Re: [nova-testing] Efforts for Essex
From: Sandy Walsh, 2011-11-22
-
Re: [nova-testing] Efforts for Essex
From: Soren Hansen, 2011-11-22
-
Re: [nova-testing] Efforts for Essex
From: Sandy Walsh, 2011-11-22
-
Re: [nova-testing] Efforts for Essex
From: Soren Hansen, 2011-11-22
-
Re: [nova-testing] Efforts for Essex
From: Sandy Walsh, 2011-11-22
-
Re: [nova-testing] Efforts for Essex
From: Soren Hansen, 2011-11-22
-
Re: [nova-testing] Efforts for Essex
From: Sandy Walsh, 2011-11-23
-
Re: [nova-testing] Efforts for Essex
From: Soren Hansen, 2011-11-23
-
Re: [nova-testing] Efforts for Essex
From: Sandy Walsh, 2011-11-23
-
Re: [nova-testing] Efforts for Essex
From: Soren Hansen, 2011-11-23