def test_build_port_bindings_with_nonmatching_internal_ports(self): port_bindings = build_port_bindings(["127.0.0.1:1000:1000","127.0.0.1:2000:2000"]) self.assertEqual(port_bindings["1000"],[("127.0.0.1","1000")]) self.assertEqual(port_bindings["2000"],[("127.0.0.1","2000")])
def test_build_port_bindings_with_one_port(self): port_bindings = build_port_bindings(["127.0.0.1:1000:1000"]) self.assertEqual(port_bindings["1000"],[("127.0.0.1","1000")])