def assertVolumesEqual(test, first, second):
 first = first.get_filesystem().get_path()
 second = second.get_filesystem().get_path()
 def get_contents(path):
  result = {}
  for child in path.children():
   if child.isdir():
    value = get_contents(child)
   else:
    value = child.getContent()
   result[child.basename()] = value
  return result
 test.assertEqual(get_contents(first), get_contents(second))

def assertVolumesEqual ( test , first , second ) : first = first . get_filesystem ( ) . get_path ( ) second = second . get_filesystem ( ) . get_path ( ) def get_contents ( path ) : result = { } for child in path . children ( ) : if child . isdir ( ) : value = get_contents ( child ) else : value = child . getContent ( ) result [ child . basename ( ) ] = value return result test . assertEqual ( get_contents ( first ) , get_contents ( second ) )
assert that two filesystems have the same contents .