yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #76057
[Bug 1805800] Re: misuse of assertTrue
Reviewed: https://review.openstack.org/620861
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=96b5ef34563d7c38b0a978ca7689032bc2cf1a04
Submitter: Zuul
Branch: master
commit 96b5ef34563d7c38b0a978ca7689032bc2cf1a04
Author: Takashi NATSUME <natsume.takashi@xxxxxxxxxxxxx>
Date: Thu Nov 29 09:36:09 2018 +0000
Fix misuse of assertTrue
If the first argument of assertTrue is True,
the assertion is always passed.
Fix it because it is useless.
Change-Id: Ie954fc770c61956a80d472190e97646a39b7420f
Closes-Bug: #1805800
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1805800
Title:
misuse of assertTrue
Status in OpenStack Compute (nova):
Fix Released
Bug description:
There is the following statement in the
test_fields_defaulted_at_create method of the TestRequestGroupObject
class in nova/tests/unit/objects/test_request_spec.py (*1).
self.assertTrue(True, rg.use_same_provider)
It is always passed, so it is useless.
It should be as follows:
self.assertTrue(rg.use_same_provider)
*1:
https://github.com/openstack/nova/blob/3b2e42f37152a539472782ad1d71c1f951c0343b/nova/tests/unit/objects/test_request_spec.py#L842
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1805800/+subscriptions
References