diff options
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() |