tests: changed mocked "file()" to mocked "open()", everywhere (#36216)

This commit is contained in:
Frédéric Péters 2019-09-18 11:10:09 +02:00
parent 269d794048
commit 05c9c1bf5d
3 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ DEBUG = False
PROJECT_NAME = 'authentic2-multitenant'
with patch.object(builtin, 'file', mock_open(read_data='xxx')):
with patch.object(builtin, 'open', mock_open(read_data='xxx')):
execfile(os.environ['DEBIAN_CONFIG_COMMON'])
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')

View File

@ -40,7 +40,7 @@ TEMPLATES = [
]
with patch.object(builtin, 'file', mock_open(read_data='xxx')):
with patch.object(builtin, 'open', mock_open(read_data='xxx')):
execfile(os.path.join(os.path.dirname(__file__), '../debian/debian_config_common.py'))
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')

View File

@ -11,7 +11,7 @@ PROJECT_NAME = 'passerelle'
#
# hobotization (multitenant)
#
with patch.object(builtin, 'file', mock_open(read_data='xxx')):
with patch.object(builtin, 'open', mock_open(read_data='xxx')):
execfile(os.environ['DEBIAN_CONFIG_COMMON'])
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')