Skip to content

Commit cfea4ae

Browse files
Jenkinsopenstack-gerrit
Jenkins
authored andcommitted
Merge "base.Resource not define __ne__() built-in function"
2 parents 81b12c0 + f97de95 commit cfea4ae

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ceilometerclient/openstack/common/apiclient/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,9 @@ def __eq__(self, other):
523523
return False
524524
return self._info == other._info
525525

526+
def __ne__(self, other):
527+
return not self.__eq__(other)
528+
526529
def is_loaded(self):
527530
return self._loaded
528531

ceilometerclient/tests/unit/test_openstack_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_two_resources_with_same_id_and_info_are_equal(self):
3333
self.assertEqual(r1, r2)
3434

3535
def test_two_resources_with_diff_type_are_not_equal(self):
36-
# Two resoruces of different types: never equal
36+
# Two resources of different types: never equal
3737
r1 = base.Resource(None, {'id': 1})
3838
r2 = events.Event(None, {'id': 1})
3939
self.assertNotEqual(r1, r2)

0 commit comments

Comments
 (0)