More robust container comparator
This commit is contained in:
parent
ba642eeb4b
commit
3dc3ce5eb9
|
@ -132,6 +132,12 @@ class Container:
|
|||
return value.split(',')
|
||||
|
||||
def __eq__(self, other):
|
||||
if other is None:
|
||||
return False
|
||||
|
||||
if not isinstance(other, Container):
|
||||
return False
|
||||
|
||||
return self.id == other.id
|
||||
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@ class ResticBackupTests(unittest.TestCase):
|
|||
self.assertEqual(len(result.containers), 3, msg="Three containers expected")
|
||||
self.assertNotEqual(result.this_container, None, msg="No backup container found")
|
||||
web_service = result.get_service('web')
|
||||
self.assertNotEqual(web_service, None)
|
||||
self.assertEqual(len(web_service.filter_mounts()), 1)
|
||||
|
||||
def test_include(self):
|
||||
|
|
Loading…
Reference in New Issue