tests: changed mocked "file()" to mocked "open()", everywhere (#36216)
This commit is contained in:
parent
269d794048
commit
05c9c1bf5d
|
@ -9,7 +9,7 @@ DEBUG = False
|
||||||
PROJECT_NAME = 'authentic2-multitenant'
|
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'])
|
execfile(os.environ['DEBIAN_CONFIG_COMMON'])
|
||||||
|
|
||||||
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')
|
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')
|
||||||
|
|
|
@ -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'))
|
execfile(os.path.join(os.path.dirname(__file__), '../debian/debian_config_common.py'))
|
||||||
|
|
||||||
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')
|
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')
|
||||||
|
|
|
@ -11,7 +11,7 @@ PROJECT_NAME = 'passerelle'
|
||||||
#
|
#
|
||||||
# hobotization (multitenant)
|
# 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'])
|
execfile(os.environ['DEBIAN_CONFIG_COMMON'])
|
||||||
|
|
||||||
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')
|
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')
|
||||||
|
|
Loading…
Reference in New Issue