mirror of https://github.com/docker/docker-py.git
python 2.6 compatible
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
This commit is contained in:
parent
8028c988ce
commit
b33052b393
|
@ -215,16 +215,13 @@ class UtilsTest(unittest.TestCase):
|
|||
[("127.0.0.1", "1000"), ("127.0.0.1", "1001")])
|
||||
|
||||
def test_split_port_invalid(self):
|
||||
with self.assertRaises(ValueError):
|
||||
split_port("0.0.0.0:1000:2000:tcp")
|
||||
self.assertRaises(ValueError, lambda: split_port("0.0.0.0:1000:2000:tcp"))
|
||||
|
||||
def test_non_matching_length_port_ranges(self):
|
||||
with self.assertRaises(ValueError):
|
||||
split_port("0.0.0.0:1000-1010:2000-2002/tcp")
|
||||
self.assertRaises(ValueError, lambda: split_port("0.0.0.0:1000-1010:2000-2002/tcp"))
|
||||
|
||||
def test_port_and_range_invalid(self):
|
||||
with self.assertRaises(ValueError):
|
||||
split_port("0.0.0.0:1000:2000-2002/tcp")
|
||||
self.assertRaises(ValueError, lambda: split_port("0.0.0.0:1000:2000-2002/tcp"))
|
||||
|
||||
def test_build_port_bindings_with_one_port(self):
|
||||
port_bindings = build_port_bindings(["127.0.0.1:1000:1000"])
|
||||
|
|
Loading…
Reference in New Issue