mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Compatibility with six-1.3.0
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from six import PY2
|
||||
from six import PY3
|
||||
from yaml.scanner import ScannerError
|
||||
|
||||
from ansible.compat.tests import unittest
|
||||
@@ -81,10 +81,10 @@ class TestDataLoaderWithVault(unittest.TestCase):
|
||||
3135306561356164310a343937653834643433343734653137383339323330626437313562306630
|
||||
3035
|
||||
"""
|
||||
if PY2:
|
||||
builtins_name = '__builtin__'
|
||||
else:
|
||||
if PY3:
|
||||
builtins_name = 'builtins'
|
||||
else:
|
||||
builtins_name = '__builtin__'
|
||||
|
||||
with patch(builtins_name + '.open', mock_open(read_data=vaulted_data)):
|
||||
output = self._loader.load_from_file('dummy_vault.txt')
|
||||
|
||||
Reference in New Issue
Block a user