Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
1e139fe0
Commit
1e139fe0
authored
Apr 14, 2015
by
Rory Finnegan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the test_data_loader to use six.builtins vs __builtins__
parent
77cd7a6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
v2/test/parsing/test_data_loader.py
+2
-1
No files found.
v2/test/parsing/test_data_loader.py
View file @
1e139fe0
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
from
__future__
import
(
absolute_import
,
division
,
print_function
)
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
__metaclass__
=
type
from
six.moves
import
builtins
from
yaml.scanner
import
ScannerError
from
yaml.scanner
import
ScannerError
from
ansible.compat.tests
import
unittest
from
ansible.compat.tests
import
unittest
...
@@ -79,6 +80,6 @@ class TestDataLoaderWithVault(unittest.TestCase):
...
@@ -79,6 +80,6 @@ class TestDataLoaderWithVault(unittest.TestCase):
3135306561356164310a343937653834643433343734653137383339323330626437313562306630
3135306561356164310a343937653834643433343734653137383339323330626437313562306630
3035
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'
)
output
=
self
.
_loader
.
load_from_file
(
'dummy_vault.txt'
)
self
.
assertEqual
(
output
,
dict
(
foo
=
'bar'
))
self
.
assertEqual
(
output
,
dict
(
foo
=
'bar'
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment