mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix broken unit test test_network_absent
This started failing following commit 515c612
, which relied on the
'Name' key being present in the return value of dockerng.networks -
as the mock didn't have this set the test started failing.
This commit is contained in:
parent
0ef6cf634c
commit
3369f0072f
1 changed files with 5 additions and 1 deletions
|
@ -724,9 +724,13 @@ class DockerngTestCase(TestCase):
|
|||
'''
|
||||
dockerng_remove_network = Mock(return_value='removed')
|
||||
dockerng_disconnect_container_from_network = Mock(return_value='disconnected')
|
||||
dockerng_networks = Mock(return_value=[{
|
||||
'Name': 'network_foo',
|
||||
'Containers': {'container': {}}
|
||||
}])
|
||||
__salt__ = {'dockerng.remove_network': dockerng_remove_network,
|
||||
'dockerng.disconnect_container_from_network': dockerng_disconnect_container_from_network,
|
||||
'dockerng.networks': Mock(return_value=[{'Containers': {'container': {}}}]),
|
||||
'dockerng.networks': dockerng_networks,
|
||||
}
|
||||
with patch.dict(dockerng_state.__dict__,
|
||||
{'__salt__': __salt__}):
|
||||
|
|
Loading…
Add table
Reference in a new issue