Bläddra i källkod

test_attic013_acl_bug: use def instead of lambda

Marian Beermann 8 år sedan
förälder
incheckning
dfd748689c
1 ändrade filer med 13 tillägg och 12 borttagningar
  1. 13 12
      src/borg/testsuite/archiver.py

+ 13 - 12
src/borg/testsuite/archiver.py

@@ -2166,18 +2166,19 @@ class ArchiverCheckTestCase(ArchiverTestCaseBase):
         # a b'acl'=None key-value pair.
         # This bug can still live on in Borg repositories (through borg upgrade).
         class Attic013Item:
-            as_dict = lambda: {
-                # These are required
-                b'path': '1234',
-                b'mtime': 0,
-                b'mode': 0,
-                b'user': b'0',
-                b'group': b'0',
-                b'uid': 0,
-                b'gid': 0,
-                # acl is the offending key.
-                b'acl': None,
-            }
+            def as_dict():
+                return {
+                    # These are required
+                    b'path': '1234',
+                    b'mtime': 0,
+                    b'mode': 0,
+                    b'user': b'0',
+                    b'group': b'0',
+                    b'uid': 0,
+                    b'gid': 0,
+                    # acl is the offending key.
+                    b'acl': None,
+                }
 
         archive, repository = self.open_archive('archive1')
         with repository: