def bind(foo):
    c = Config()
    c.add({"test": foo})
    return c.test
Esempio n. 2
0
 def create_from_list(cls, specification):
     """ Given a list of types and parameters, build a resource bundle """
     c = Config()
     c.add({"resources": specification})
     return cls.create_from_yay_expression(c.resources)
Esempio n. 3
0
 def create_from_list(cls, specification):
     """ Given a list of types and parameters, build a resource bundle """
     c = Config()
     c.add({"resources": specification})
     return cls.create_from_yay_expression(c.resources)
Esempio n. 4
0
    def test_override_literal(self):
        config = Config()
        config.load(test_yay)
        config.add(dict(injected_data="xyz"))

        self.failUnlessEqual(config.get()["result"], "xyz")
Esempio n. 5
0
def bind(foo):
    c = Config()
    c.add({"test": foo})
    return c.test
Esempio n. 6
0
    def test_override_literal(self):
        config = Config()
        config.load(test_yay)
        config.add(dict(injected_data="xyz"))

        self.failUnlessEqual(config.get()["result"], "xyz")