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

Jay Pipes jaypipes at gmail.com
Thu Aug 23 12:40:21 UTC 2018


On 08/23/2018 08:06 AM, Doug Hellmann wrote:
> Excerpts from Davanum Srinivas (dims)'s message of 2018-08-23 06:46:38 -0400:
>> Where exactly Eric? I can't seem to find the import:
>>
>> http://codesearch.openstack.org/?q=(from%7Cimport).*oslotest&i=nope&files=&repos=oslo.utils
>>
>> -- dims
> 
> oslo.utils depends on oslotest via test-requirements.txt and oslotest is
> used within the test modules in oslo.utils.
> 
> As I've said on both reviews, I think we do not want a global
> singleton instance of this sentinal class. We do want a formal test
> fixture.  Either library can export a test fixture and olso.utils
> already has oslo_utils.fixture.TimeFixture so there's precedent to
> adding it there, so I have a slight preference for just doing that.
> 
> That said, oslo_utils.uuidutils.generate_uuid() is simply returning
> str(uuid.uuid4()). We have it wrapped up as a function so we can
> mock it out in other tests, but we hardly need to rely on that if
> we're making a test fixture for oslotest.
> 
> My vote is to add a new fixture class to oslo_utils.fixture.

OK, thanks for the helpful explanation, Doug. Works for me.

-jay



More information about the OpenStack-dev mailing list