def METHOD_NAME(self):
    try:
        if os.path.exists('.elasticbeanstalk'):
            shutil.rmtree('.elasticbeanstalk')
        enclosign_dir = '.elasticbeanstalk/logs'
        root_log_dir = '.elasticbeanstalk/logs/local'
        new_local_dir = '.elasticbeanstalk/logs/local/1234456'
        log.make_logdirs(root_log_dir, new_local_dir)
        if sys.version_info < (3, 0):
            local_dir_permissions = '040777'
            enclosing_dir_permissions = '040744'
        else:
            local_dir_permissions = '0o40777'
            enclosing_dir_permissions = '0o40744'
        self.assertEqual(enclosing_dir_permissions, oct(os.stat(enclosign_dir).st_mode))
        self.assertEqual(local_dir_permissions, oct(os.stat(root_log_dir).st_mode))
        self.assertEqual(local_dir_permissions, oct(os.stat(new_local_dir).st_mode))
    finally:
        shutil.rmtree('.elasticbeanstalk')