def test_running_discard_wrong_environemnt_values(self):
        __salt__ = {'dockerng.list_containers': MagicMock(),
                    'dockerng.list_tags': MagicMock(
                        return_value=['image:latest']),
                    'dockerng.inspect_image': MagicMock(),
                    'dockerng.pull': MagicMock(),
                    'dockerng.state': MagicMock(),
                    'dockerng.create': MagicMock(),
                    'dockerng.start': MagicMock(),
                    }
        with patch.dict(dockerng_state.__dict__,
                        {'__salt__': __salt__}):
            for wrong_value in (1, .2, (), [], {}):
                ret = dockerng_state.running(
                    'cont',
                    image='image:latest',
                    environment=[{'KEY': wrong_value}])
                self.assertEqual(ret,
                                 {'changes': {},
                                  'comment': 'Environment values must'
                                  ' be strings KEY=\'{0}\''.format(wrong_value),
                                  'name': 'cont',
                                  'result': False})
environment values should be string.
dataset/ETHPy150Open saltstack/salt/tests/unit/states/dockerng_test.py/DockerngTestCase.test_running_discard_wrong_environemnt_values