Make environment variables without a value the same as docker-cli.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2016-02-22 17:47:51 -08:00
commit 9d7dbe3857
7 changed files with 28 additions and 12 deletions

View file

@ -138,9 +138,10 @@ class CLITestCase(unittest.TestCase):
})
_, _, call_kwargs = mock_client.create_container.mock_calls[0]
self.assertEqual(
call_kwargs['environment'],
{'FOO': 'ONE', 'BAR': 'NEW', 'OTHER': u'bär'})
assert (
sorted(call_kwargs['environment']) ==
sorted(['FOO=ONE', 'BAR=NEW', 'OTHER=bär'])
)
def test_run_service_with_restart_always(self):
command = TopLevelCommand()