def test_open_ports_added(self):
        fake_network = make_memory_network()
        api = ApplicationNodeDeployer(
            u'example.com', docker_client=FakeDockerClient(),
            network=fake_network)

        expected_open_port = OpenPort(port=3306)
        d = OpenPorts(ports=[expected_open_port]).run(
            api, state_persister=InMemoryStatePersister())
        self.successResultOf(d)
        self.assertEqual(
            [expected_open_port],
            fake_network.enumerate_open_ports()
        )
Porst which are required are opened.
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/test/test_container.py/OpenPortsTests.test_open_ports_added