def test_desired_proxies_remain(self):
        fake_network = make_memory_network()

        # A proxy which will be removed
        fake_network.create_proxy_to(ip=u'192.0.2.100', port=3306)
        # And some proxies which are still required
        required_proxy1 = fake_network.create_proxy_to(ip=u'192.0.2.101',
                                                       port=3306)
        required_proxy2 = fake_network.create_proxy_to(ip=u'192.0.2.101',
                                                       port=8080)

        api = ApplicationNodeDeployer(
            u'example.com', docker_client=FakeDockerClient(),
            network=fake_network)

        d = SetProxies(ports=[required_proxy1, required_proxy2]).run(
            api, state_persister=InMemoryStatePersister())

        self.successResultOf(d)
        self.assertEqual(
            set([required_proxy1, required_proxy2]),
            set(fake_network.enumerate_proxies())
        )
Proxies which exist on the node and which are still required are not
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/test/test_container.py/SetProxiesTests.test_desired_proxies_remain