mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix mock_open call to use new multifile syntax
This commit is contained in:
parent
7f516ef73a
commit
55487c175c
1 changed files with 1 additions and 1 deletions
|
@ -164,7 +164,7 @@ class NetworkTestCase(TestCase):
|
|||
## ccc
|
||||
127.0.0.1 localhost thisismyhostname # 本机
|
||||
''')
|
||||
fopen_mock = mock_open(read_data=content, match='/etc/hosts')
|
||||
fopen_mock = mock_open(read_data={'/etc/hosts': content})
|
||||
with patch('salt.utils.files.fopen', fopen_mock):
|
||||
assert 'thisismyhostname' in network._generate_minion_id()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue