From 1e139fe08f5e1e534928491c2cf87664627ecff2 Mon Sep 17 00:00:00 2001 From: Rory Finnegan Date: Tue, 14 Apr 2015 23:30:41 -0400 Subject: [PATCH] Updated the test_data_loader to use six.builtins vs __builtins__ --- v2/test/parsing/test_data_loader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2/test/parsing/test_data_loader.py b/v2/test/parsing/test_data_loader.py index 75ceb662f73..5117150b4fe 100644 --- a/v2/test/parsing/test_data_loader.py +++ b/v2/test/parsing/test_data_loader.py @@ -19,6 +19,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type +from six.moves import builtins from yaml.scanner import ScannerError from ansible.compat.tests import unittest @@ -79,6 +80,6 @@ class TestDataLoaderWithVault(unittest.TestCase): 3135306561356164310a343937653834643433343734653137383339323330626437313562306630 3035 """ - with patch('__builtin__.open', mock_open(read_data=vaulted_data)): + with patch('builtins.open', mock_open(read_data=vaulted_data)): output = self._loader.load_from_file('dummy_vault.txt') self.assertEqual(output, dict(foo='bar'))