summaryrefslogtreecommitdiffstats
path: root/python-dockering/tests/test_config_building.py
diff options
context:
space:
mode:
Diffstat (limited to 'python-dockering/tests/test_config_building.py')
-rw-r--r--python-dockering/tests/test_config_building.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python-dockering/tests/test_config_building.py b/python-dockering/tests/test_config_building.py
index c9251e2..ff1b409 100644
--- a/python-dockering/tests/test_config_building.py
+++ b/python-dockering/tests/test_config_building.py
@@ -148,3 +148,11 @@ def test_parse_volumes_param():
assert actual == expected
assert None == doc._parse_volumes_param(None)
+
+
+def test_get_container_ports():
+ hcp = {'publish_all_ports': False, 'port_bindings': {'80': {'HostPort':
+ '80'}, '22': {'HostPort': '22'}}}
+ assert sorted(['80', '22']) == sorted(doc._get_container_ports(hcp))
+
+ assert None == doc._get_container_ports({})