def test_create_container_with_ports_response(self):
        ports = [
            {'internal': 5432, 'external': 54320},
        ]
        container_json = {
            u"node_uuid": self.NODE_B, u"name": u"postgres",
            u"image": u"postgres", u"ports": ports
        }
        container_json_result = {
            u"node_uuid": self.NODE_B, u"name": u"postgres",
            u"image": u"postgres:latest", u"ports": ports,
            u"restart_policy": {u"name": u"never"}
        }
        return self.assertResult(
            b"POST", b"/configuration/containers",
            container_json, CREATED, container_json_result
        )
A valid API request to create a container including port mappings
dataset/ETHPy150Open ClusterHQ/flocker/flocker/control/test/test_httpapi.py/CreateContainerTestsMixin.test_create_container_with_ports_response