base.Resource not define __ne__() built-in function
Class base.Resource defines __eq__() built-in function, but does not define __ne__() built-in function, so self.assertEqual works but self.assertNotEqual does not work at all in this test case in python2. This patch fixes it. Change-Id: I819cb27664661e0b67d1e886c28432a2d1134cb0 Closes-Bug: #1586268
This commit is contained in:
parent
db90b6f6df
commit
5cebb31c09
@ -93,6 +93,9 @@ class Model(object):
|
||||
def __eq__(self, other):
|
||||
return self.as_dict() == other.as_dict()
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self.__eq__(other)
|
||||
|
||||
@classmethod
|
||||
def get_field_names(cls):
|
||||
fields = inspect.getargspec(cls.__init__)[0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user