diff options
author | Joffrey F <joffrey@docker.com> | 2014-12-18 18:03:27 -0800 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2014-12-18 18:03:27 -0800 |
commit | 2218dbaa6772838020e2836ac5dd2fddd4f3f574 (patch) | |
tree | 2f4719e88a84b5b8d40cd4fc842a2063ba589134 /tests | |
parent | 53d61a77b6fe3fe4178334511f20c2a292d1ce04 (diff) | |
download | docker-py-0.7.0-release.tar.gz |
Use create_host_config in start (unifying parameter processing)0.7.0-release
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test.py | 1 | ||||
-rw-r--r-- | tests/utils_test.py | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/test.py b/tests/test.py index 2a22b3c..bd56d64 100644 --- a/tests/test.py +++ b/tests/test.py @@ -733,7 +733,6 @@ class DockerClientTest(Cleanup, unittest.TestCase): args = fake_request.call_args self.assertEqual(args[0][0], url_prefix + 'containers/create') data = json.loads(args[1]['data']) - self.assertEqual(data['HostConfig']['PublishAllPorts'], False) port_bindings = data['HostConfig']['PortBindings'] self.assertTrue('1111/tcp' in port_bindings) self.assertTrue('2222/tcp' in port_bindings) diff --git a/tests/utils_test.py b/tests/utils_test.py index 9023b08..2708302 100644 --- a/tests/utils_test.py +++ b/tests/utils_test.py @@ -5,7 +5,8 @@ import unittest from docker.client import Client from docker.errors import DockerException from docker.utils import ( - parse_repository_tag, parse_host, convert_filters, kwargs_from_env + parse_repository_tag, parse_host, convert_filters, kwargs_from_env, + create_host_config ) @@ -95,6 +96,10 @@ class UtilsTest(unittest.TestCase): for filters, expected in tests: self.assertEqual(convert_filters(filters), expected) + def test_create_host_config(self): + empty_config = create_host_config() + self.assertEqual(empty_config, {}) + if __name__ == '__main__': unittest.main() |