mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-09-28 06:35:24 +00:00
More robust container comparator
This commit is contained in:
@@ -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):
|
||||
|
Reference in New Issue
Block a user