Fix NotImplemented into NotImplementedError
This commit is contained in:
1 parent
44ae6e33d0
commit
faeedb7179
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -154,7 +154,7 @@ class TrytondConfig(Config):
|
||||
|
||||
def __eq__(self, other):
|
||||
if not isinstance(other, TrytondConfig):
|
||||
raise NotImplemented
|
||||
raise NotImplementedError
|
||||
return (self.database_name == other.database_name
|
||||
and self._user == other._user
|
||||
and self.database_type == other.database_type
|
||||
@@ -211,7 +211,7 @@ class XmlrpcConfig(Config):
|
||||
|
||||
def __eq__(self, other):
|
||||
if not isinstance(other, XmlrpcConfig):
|
||||
raise NotImplemented
|
||||
raise NotImplementedError
|
||||
return self.url == other.url
|
||||
|
||||
def __hash__(self):
|
||||
|
||||
@@ -26,4 +26,4 @@ class TestConfig(TestCase):
|
||||
config2 = proteus.config.get_config()
|
||||
self.assertEqual(config1, config2)
|
||||
|
||||
self.assertEqual(config1.__eq__(None), NotImplemented)
|
||||
self.assertRaises(NotImplementedError, config1.__eq__, None)
|
||||
Reference in new issue
Block a user