def test_config_change(self):
        yml = """endpoints:
  # adapters are applied in order
  "POST /*/containers/create":
    pre: [flocker, weave]
    post: [weave, flocker]
  "DELETE /*/containers/*":
    pre: [flocker, weave]
    post: [weave, flocker]
adapters:
  flocker: http://flocker/flocker-adapter
  weave: http://weave/weave-adapter"""
        tmp = self.mktemp()
        self.config._default_file = tmp
        fp = FilePath(tmp)
        fp.setContent(yml)
        
        self.config.read_and_parse()

        self.assertEquals((self.config._endpoints, self.config._adapters), ({
                "POST /*/containers/create": {
                    "pre": ["flocker", "weave"],
                    "post": ["weave", "flocker"],
                },
                "DELETE /*/containers/*": {
                    "pre": ["flocker", "weave"],
                    "post": ["weave", "flocker"],
                },
            }, {
                "flocker": "http://flocker/flocker-adapter",
                "weave": "http://weave/weave-adapter",
            }))

        yml = """endpoints:
  # adapters are applied in order
  "POST /*/containers/stop":
    pre: [flocker]
adapters:
  flocker: http://flocker/flocker-adapter"""
        tmp = self.mktemp()
        self.config._default_file = tmp
        fp = FilePath(tmp)
        fp.setContent(yml)
        
        self.config.read_and_parse()

        self.assertEquals((self.config._endpoints, self.config._adapters), ({
                "POST /*/containers/stop": {
                    "pre": ["flocker"],
                    "post": [],
                },
            }, {
                "flocker": "http://flocker/flocker-adapter",
            }))
If the config is changed, the new config is reflected.
dataset/ETHPy150Open ClusterHQ/powerstrip/powerstrip/test/test_config.py/ReadAndParseTests.test_config_change