[openstack-dev] [oslo] UUID sentinel needs a home

Ben Nemec openstack at nemebean.com
Thu Aug 23 20:01:30 UTC 2018



On 08/23/2018 12:25 PM, Doug Hellmann wrote:
> Excerpts from Eric Fried's message of 2018-08-23 09:51:21 -0500:
>> Do you mean an actual fixture, that would be used like:
>>
>>   class MyTestCase(testtools.TestCase):
>>       def setUp(self):
>>           self.uuids = self.useFixture(oslofx.UUIDSentinelFixture()).uuids
>>
>>       def test_foo(self):
>>           do_a_thing_with(self.uuids.foo)
>>
>> ?
>>
>> That's... okay I guess, but the refactoring necessary to cut over to it
>> will now entail adding 'self.' to every reference. Is there any way
>> around that?
> 
> That is what I had envisioned, yes.  In the absence of a global,
> which we do not want, what other API would you propose?

If we put it in oslotest instead, would the global still be a problem? 
Especially since mock has already established a pattern for this 
functionality?



More information about the OpenStack-dev mailing list