Changed an assert to more specific assert method

Following OpenStack Style Guidelines [1], I changed:
assertFalse(sth in sth) to assertNotIn(sth, sth).

After this change, a more specific message is shown on error.

[1]: http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises

Change-Id: I929900eb5dc48eb04b541e387b70d69c4865ca03
This commit is contained in:
Luong Anh Tuan 2016-08-30 08:07:31 +07:00
parent 3919c29a99
commit 37150ca0a3
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ class TestExtraHardware(test_base.NodeTest):
[{'op': 'add', 'path': '/extra/hardware_swift_object',
'value': name}])
self.assertFalse('data' in introspection_data)
self.assertNotIn('data', introspection_data)
def test_no_data_recieved(self, patch_mock, swift_mock):
introspection_data = {'cats': 'meow'}