Merge "base.Resource not define __ne__() built-in function"

This commit is contained in:
Jenkins
2016-07-12 02:54:39 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 1 deletions

View File

@@ -523,6 +523,9 @@ class Resource(object):
return False
return self._info == other._info
def __ne__(self, other):
return not self.__eq__(other)
def is_loaded(self):
return self._loaded

View File

@@ -33,7 +33,7 @@ class BaseTest(utils.BaseTestCase):
self.assertEqual(r1, r2)
def test_two_resources_with_diff_type_are_not_equal(self):
# Two resoruces of different types: never equal
# Two resources of different types: never equal
r1 = base.Resource(None, {'id': 1})
r2 = events.Event(None, {'id': 1})
self.assertNotEqual(r1, r2)