def test_volume_absent(self):
        dockerng_remove_volume = Mock(return_value='removed')
        __salt__ = {'dockerng.remove_volume': dockerng_remove_volume,
                    'dockerng.volumes': Mock(return_value={
                        'Volumes': [{'Name': 'volume_foo'}]}),
                    }
        with patch.dict(dockerng_state.__dict__,
                        {'__salt__': __salt__}):
            ret = dockerng_state.volume_absent(
                'volume_foo',
                )
        dockerng_remove_volume.assert_called_with('volume_foo')
        self.assertEqual(ret, {'name': 'volume_foo',
                               'comment': '',
                               'changes': {'removed': 'removed'},
                               'result': True})
Test dockerng.volume_absent
dataset/ETHPy150Open saltstack/salt/tests/unit/states/dockerng_test.py/DockerngTestCase.test_volume_absent